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! |
|
|
||
| // 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 |
* changing system tests and updating types * preliminary type interface changes * complete documentation and system-test changes * updating system-tests for getting metadata
* updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
🤖 I have created a release \*beep\* \*boop\* --- ## [2.11.0](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.10.0...v2.11.0) (2021-04-14) ### ⚠ BREAKING CHANGES * fix: added support for Opentelemetry 0.18 - makes significant changes to OpenTelemetry support in order to unblock its usage again; the main user-visible change is that you will need to use 0.18+ versions of OpenTelemetry, and different items are passed to the server in spans. ### Bug Fixes * added support for Opentelemetry 0.18 ([#1234](https://www.github.com/googleapis/nodejs-pubsub/issues/1234)) ([aedc36c](https://www.github.com/googleapis/nodejs-pubsub/commit/aedc36c3f8736eff1cb781b9e05457463481b3d6)) * follow-on proto updates from the removal of the common protos ([#1229](https://www.github.com/googleapis/nodejs-pubsub/issues/1229)) ([cb627d5](https://www.github.com/googleapis/nodejs-pubsub/commit/cb627d5555c617eb025181c9f9aaf1d2c9621a86)) * prevent attempt to publish 0 messages ([#1218](https://www.github.com/googleapis/nodejs-pubsub/issues/1218)) ([96e6535](https://www.github.com/googleapis/nodejs-pubsub/commit/96e653514b35d61f74ba2d5d6fa96e19bc45bf8c)) * remove common protos ([#1232](https://www.github.com/googleapis/nodejs-pubsub/issues/1232)) ([8838288](https://www.github.com/googleapis/nodejs-pubsub/commit/883828800c94f7ea21c8306d272b70b4576c664c)) * reverting the major from the OpenTelemetry change (it was already broken) ([#1257](https://www.github.com/googleapis/nodejs-pubsub/issues/1257)) ([09c428a](https://www.github.com/googleapis/nodejs-pubsub/commit/09c428a17eb20fcd0fc45301addb48d2bebc56a3)) * temporarily pin sinon at 10.0.0 ([#1252](https://www.github.com/googleapis/nodejs-pubsub/issues/1252)) ([0922164](https://www.github.com/googleapis/nodejs-pubsub/commit/09221643be0693463ed4e5d56efd0f1ebfbe78b7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* Add npm run compile to the testproxy command The test proxy references the compiled client library code. Every time the test proxy is run, we want it to reflect the source code so that as we develop we don’t get confused about what gets observed. * feat: Add npm run compile to the testproxy command
* Add npm run compile to the testproxy command The test proxy references the compiled client library code. Every time the test proxy is run, we want it to reflect the source code so that as we develop we don’t get confused about what gets observed. * feat: Add npm run compile to the testproxy command
🤖 I have created a release \*beep\* \*boop\* --- ## [2.11.0](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.10.0...v2.11.0) (2021-04-14) ### ⚠ BREAKING CHANGES * fix: added support for Opentelemetry 0.18 - makes significant changes to OpenTelemetry support in order to unblock its usage again; the main user-visible change is that you will need to use 0.18+ versions of OpenTelemetry, and different items are passed to the server in spans. ### Bug Fixes * added support for Opentelemetry 0.18 ([#1234](https://www.github.com/googleapis/nodejs-pubsub/issues/1234)) ([faf49eb](https://www.github.com/googleapis/nodejs-pubsub/commit/faf49ebfbff8a3b309e2aab4e58b1a25a7fc4a9e)) * follow-on proto updates from the removal of the common protos ([#1229](https://www.github.com/googleapis/nodejs-pubsub/issues/1229)) ([cb627d5](https://www.github.com/googleapis/nodejs-pubsub/commit/cb627d5555c617eb025181c9f9aaf1d2c9621a86)) * prevent attempt to publish 0 messages ([#1218](https://www.github.com/googleapis/nodejs-pubsub/issues/1218)) ([96e6535](https://www.github.com/googleapis/nodejs-pubsub/commit/96e653514b35d61f74ba2d5d6fa96e19bc45bf8c)) * remove common protos ([#1232](https://www.github.com/googleapis/nodejs-pubsub/issues/1232)) ([8838288](https://www.github.com/googleapis/nodejs-pubsub/commit/883828800c94f7ea21c8306d272b70b4576c664c)) * reverting the major from the OpenTelemetry change (it was already broken) ([#1257](https://www.github.com/googleapis/nodejs-pubsub/issues/1257)) ([09c428a](https://www.github.com/googleapis/nodejs-pubsub/commit/09c428a17eb20fcd0fc45301addb48d2bebc56a3)) * temporarily pin sinon at 10.0.0 ([#1252](https://www.github.com/googleapis/nodejs-pubsub/issues/1252)) ([0922164](https://www.github.com/googleapis/nodejs-pubsub/commit/09221643be0693463ed4e5d56efd0f1ebfbe78b7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* Add npm run compile to the testproxy command The test proxy references the compiled client library code. Every time the test proxy is run, we want it to reflect the source code so that as we develop we don’t get confused about what gets observed. * feat: Add npm run compile to the testproxy command
(re: #1257)
Added
{ reuseExisting: true }tosubscribemethod call in pubsub sample