Skip to content

Commit

Permalink
readme: pubsub: add reuseExisting to example
Browse files Browse the repository at this point in the history
Fixes #1258
  • Loading branch information
stephenplusplus committed Apr 23, 2016
1 parent 5771373 commit 4d754ac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down

0 comments on commit 4d754ac

Please sign in to comment.