Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #1258

Closed
wants to merge 1 commit into from
Closed

Conversation

jasonpolites
Copy link

@jasonpolites jasonpolites commented Apr 22, 2016

(re: #1257)

Added { reuseExisting: true } to subscribe method call in pubsub sample

Added `{ reuseExisting: true }` to `subscribe` method call in pubsub sample
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Apr 22, 2016
@jasonpolites
Copy link
Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Apr 22, 2016
@@ -243,7 +243,7 @@ topic.publish({
}, function(err) {});

// Subscribe to the topic.
topic.subscribe('new-subscription', function(err, subscription) {
topic.subscribe('new-subscription', { reuseExisting: true }, function(err, subscription) {

This comment was marked as spam.

This comment was marked as spam.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 1bf098f on jasonpolites:patch-1 into 5771373 on GoogleCloudPlatform:master.

@c0b
Copy link
Contributor

c0b commented Feb 9, 2017

why the option { reuseExisting: true } disappeared?

/node_modules/protobufjs/dist/protobuf.js:2490
                            throw Error(this+"#"+keyOrObj+" is not a field: undefined");
                            ^

Error: .google.pubsub.v1.Subscription#reuseExisting is not a field: undefined
    at Error (native)
    at MessagePrototype.set (/node_modules/protobufjs/dist/protobuf.js:2490:35)
    at MessagePrototype.set (/node_modules/protobufjs/dist/protobuf.js:2483:38)
    at Message (/node_modules/protobufjs/dist/protobuf.js:2411:34)
    at serialize (/node_modules/grpc/src/node/src/common.js:87:23)
    at Client.makeUnaryRequest [as createSubscription] (/node_modules/grpc/src/node/src/client.js:395:19)
    at Object.request (/node_modules/@google-cloud/common-grpc/src/service.js:265:32)
    at makeRequest (/node_modules/retry-request/index.js:88:28)
    at retryRequest (/node_modules/retry-request/index.js:58:3)
    at PubSub.GrpcService.request (/node_modules/@google-cloud/common-grpc/src/service.js:283:3)

real    0m1.316s
user    0m0.952s
sys     0m0.092s

@stephenplusplus
Copy link
Contributor

This option was removed in favor of always re-using an existing subscription: #1799

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants