Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

Commit bdc690e

Browse files
author
Benjamin E. Coe
authored
fix(docs): add documentation about running C++ gRPC bindings (#782)
1 parent 185f60f commit bdc690e

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

.readme-partials.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,19 @@ introduction: |-
88
[Pub/Sub quickstart](https://cloud.google.com/pubsub/docs/quickstart-client-libraries),
99
[publisher](https://cloud.google.com/pubsub/docs/publisher), and [subscriber](https://cloud.google.com/pubsub/docs/subscriber)
1010
guides.
11+
body: |-
12+
## Running gRPC C++ bindings
13+
14+
For some workflows and environments it might make sense to use the C++ gRPC implementation,
15+
instead of the default one (see: [#770](https://github.com/googleapis/nodejs-pubsub/issues/770)):
16+
17+
To configure `@google-cloud/pubsub` to use an alternative `grpc` transport:
18+
19+
1. `npm install grpc`, adding `grpc` as a dependency.
20+
1. instantiate `@google-cloud/pubsub` with `grpc`:
21+
22+
```js
23+
const {PubSub} = require('@google-cloud/pubsub');
24+
const grpc = require('grpc');
25+
const pubsub = new PubSub({grpc});
26+
```

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,21 @@ async function quickstart(
7979
}
8080

8181
```
82+
## Running gRPC C++ bindings
8283

84+
For some workflows and environments it might make sense to use the C++ gRPC implementation,
85+
instead of the default one (see: [#770](https://github.com/googleapis/nodejs-pubsub/issues/770)):
86+
87+
To configure `@google-cloud/pubsub` to use an alternative `grpc` transport:
88+
89+
1. `npm install grpc`, adding `grpc` as a dependency.
90+
1. instantiate `@google-cloud/pubsub` with `grpc`:
91+
92+
```js
93+
const {PubSub} = require('@google-cloud/pubsub');
94+
const grpc = require('grpc');
95+
const pubsub = new PubSub({grpc});
96+
```
8397

8498

8599
## Samples

0 commit comments

Comments
 (0)