-
Notifications
You must be signed in to change notification settings - Fork 596
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
Update README.md #1258
Conversation
Added `{ reuseExisting: true }` to `subscribe` method call in pubsub sample
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! |
CLAs look good, thanks! |
@@ -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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
why the option /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 |
This option was removed in favor of always re-using an existing subscription: #1799 |
(re: #1257)
Added
{ reuseExisting: true }
tosubscribe
method call in pubsub sample