From 4d754ac9d9ea28353a9b1e099552fc19fa8b45b4 Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Sat, 23 Apr 2016 12:55:24 -0400 Subject: [PATCH] readme: pubsub: add `reuseExisting` to example Fixes #1258 --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f7bdfa9712..93e232b6c33 100644 --- a/README.md +++ b/README.md @@ -243,7 +243,11 @@ topic.publish({ }, function(err) {}); // Subscribe to the topic. -topic.subscribe('new-subscription', function(err, subscription) { +var options = { + reuseExisting: true +}; + +topic.subscribe('subscription-name', options, function(err, subscription) { // Register listeners to start pulling for messages. function onError(err) {} function onMessage(message) {}