1 | [//]: # "This README.md file is auto-generated, all changes to this file will be lost."
|
2 | [//]: # "To regenerate it, use `python -m synthtool`."
|
3 | <img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
|
4 |
|
5 | # [Google Cloud Pub/Sub: Node.js Client](https://github.com/googleapis/nodejs-pubsub)
|
6 |
|
7 | [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
|
8 | [![npm version](https://img.shields.io/npm/v/@google-cloud/pubsub.svg)](https://www.npmjs.org/package/@google-cloud/pubsub)
|
9 | [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-pubsub/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-pubsub)
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | [Cloud Pub/Sub](https://cloud.google.com/pubsub/docs) is a fully-managed real-time messaging service that allows
|
15 | you to send and receive messages between independent applications.
|
16 |
|
17 | This document contains links to an [API reference](https://googleapis.dev/nodejs/pubsub/latest/index.html#reference), samples,
|
18 | and other resources useful to developing Node.js applications.
|
19 | For additional help developing Pub/Sub applications, in Node.js and other languages, see our
|
20 | [Pub/Sub quickstart](https://cloud.google.com/pubsub/docs/quickstart-client-libraries),
|
21 | [publisher](https://cloud.google.com/pubsub/docs/publisher), and [subscriber](https://cloud.google.com/pubsub/docs/subscriber)
|
22 | guides.
|
23 |
|
24 |
|
25 | A comprehensive list of changes in each version may be found in
|
26 | [the CHANGELOG](https://github.com/googleapis/nodejs-pubsub/blob/master/CHANGELOG.md).
|
27 |
|
28 | * [Google Cloud Pub/Sub Node.js Client API Reference][client-docs]
|
29 | * [Google Cloud Pub/Sub Documentation][product-docs]
|
30 | * [github.com/googleapis/nodejs-pubsub](https://github.com/googleapis/nodejs-pubsub)
|
31 |
|
32 | Read more about the client libraries for Cloud APIs, including the older
|
33 | Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
34 |
|
35 | [explained]: https://cloud.google.com/apis/docs/client-libraries-explained
|
36 |
|
37 | **Table of contents:**
|
38 |
|
39 |
|
40 | * [Quickstart](#quickstart)
|
41 | * [Before you begin](#before-you-begin)
|
42 | * [Installing the client library](#installing-the-client-library)
|
43 | * [Using the client library](#using-the-client-library)
|
44 | * [Samples](#samples)
|
45 | * [Versioning](#versioning)
|
46 | * [Contributing](#contributing)
|
47 | * [License](#license)
|
48 |
|
49 | ## Quickstart
|
50 |
|
51 | ### Before you begin
|
52 |
|
53 | 1. [Select or create a Cloud Platform project][projects].
|
54 | 1. [Enable billing for your project][billing].
|
55 | 1. [Enable the Google Cloud Pub/Sub API][enable_api].
|
56 | 1. [Set up authentication with a service account][auth] so you can access the
|
57 | API from your local workstation.
|
58 |
|
59 | ### Installing the client library
|
60 |
|
61 | ```bash
|
62 | npm install @google-cloud/pubsub
|
63 | ```
|
64 |
|
65 |
|
66 | ### Using the client library
|
67 |
|
68 | ```javascript
|
69 | // Imports the Google Cloud client library
|
70 | const {PubSub} = require('@google-cloud/pubsub');
|
71 |
|
72 | async function quickstart(
|
73 | projectId = 'your-project-id', // Your Google Cloud Platform project ID
|
74 | topicName = 'my-topic', // Name for the new topic to create
|
75 | subscriptionName = 'my-sub' // Name for the new subscription to create
|
76 | ) {
|
77 | // Instantiates a client
|
78 | const pubsub = new PubSub({projectId});
|
79 |
|
80 | // Creates a new topic
|
81 | const [topic] = await pubsub.createTopic(topicName);
|
82 | console.log(`Topic ${topic.name} created.`);
|
83 |
|
84 | // Creates a subscription on that new topic
|
85 | const [subscription] = await topic.createSubscription(subscriptionName);
|
86 |
|
87 | // Receive callbacks for new messages on the subscription
|
88 | subscription.on('message', message => {
|
89 | console.log('Received message:', message.data.toString());
|
90 | process.exit(0);
|
91 | });
|
92 |
|
93 | // Receive callbacks for errors on the subscription
|
94 | subscription.on('error', error => {
|
95 | console.error('Received error:', error);
|
96 | process.exit(1);
|
97 | });
|
98 |
|
99 | // Send a message to the topic
|
100 | topic.publish(Buffer.from('Test message!'));
|
101 | }
|
102 |
|
103 | ```
|
104 | ## Running gRPC C++ bindings
|
105 |
|
106 | For some workflows and environments it might make sense to use the C++ gRPC implementation,
|
107 | instead of the default one (see: [#770](https://github.com/googleapis/nodejs-pubsub/issues/770)):
|
108 |
|
109 | To configure `@google-cloud/pubsub` to use an alternative `grpc` transport:
|
110 |
|
111 | 1. `npm install grpc`, adding `grpc` as a dependency.
|
112 | 1. instantiate `@google-cloud/pubsub` with `grpc`:
|
113 |
|
114 | ```js
|
115 | const {PubSub} = require('@google-cloud/pubsub');
|
116 | const grpc = require('grpc');
|
117 | const pubsub = new PubSub({grpc});
|
118 | ```
|
119 |
|
120 |
|
121 | ## Samples
|
122 |
|
123 | Samples are in the [`samples/`](https://github.com/googleapis/nodejs-pubsub/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample.
|
124 |
|
125 | | Sample | Source Code | Try it |
|
126 | | --------------------------- | --------------------------------- | ------ |
|
127 | | Create an Avro based Schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/createAvroSchema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createAvroSchema.js,samples/README.md) |
|
128 | | Create a Proto based Schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/createProtoSchema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createProtoSchema.js,samples/README.md) |
|
129 | | Create Push Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/createPushSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createPushSubscription.js,samples/README.md) |
|
130 | | Create Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/createSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createSubscription.js,samples/README.md) |
|
131 | | Create Subscription With Dead Letter Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/createSubscriptionWithDeadLetterPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createSubscriptionWithDeadLetterPolicy.js,samples/README.md) |
|
132 | | Create Subscription with ordering enabled | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/createSubscriptionWithOrdering.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createSubscriptionWithOrdering.js,samples/README.md) |
|
133 | | Create Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/createTopic.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createTopic.js,samples/README.md) |
|
134 | | Create Topic With Schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/createTopicWithSchema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createTopicWithSchema.js,samples/README.md) |
|
135 | | Delete a previously created schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/deleteSchema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/deleteSchema.js,samples/README.md) |
|
136 | | Delete Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/deleteSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/deleteSubscription.js,samples/README.md) |
|
137 | | Delete Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/deleteTopic.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/deleteTopic.js,samples/README.md) |
|
138 | | Detach Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/detachSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/detachSubscription.js,samples/README.md) |
|
139 | | Get a previously created schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/getSchema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/getSchema.js,samples/README.md) |
|
140 | | Get Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/getSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/getSubscription.js,samples/README.md) |
|
141 | | Get Subscription Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/getSubscriptionPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/getSubscriptionPolicy.js,samples/README.md) |
|
142 | | Get Topic Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/getTopicPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/getTopicPolicy.js,samples/README.md) |
|
143 | | List All Topics | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/listAllTopics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listAllTopics.js,samples/README.md) |
|
144 | | List schemas on a project | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/listSchemas.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listSchemas.js,samples/README.md) |
|
145 | | List Subscriptions | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/listSubscriptions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listSubscriptions.js,samples/README.md) |
|
146 | | List Subscriptions On a Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/listTopicSubscriptions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listTopicSubscriptions.js,samples/README.md) |
|
147 | | Listen For Avro Records | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/listenForAvroRecords.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listenForAvroRecords.js,samples/README.md) |
|
148 | | Listen For Errors | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/listenForErrors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listenForErrors.js,samples/README.md) |
|
149 | | Listen For Messages | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/listenForMessages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listenForMessages.js,samples/README.md) |
|
150 | | Listen For Protobuf Messages | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/listenForProtobufMessages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listenForProtobufMessages.js,samples/README.md) |
|
151 | | Listen For Messages With Custom Attributes | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/listenWithCustomAttributes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listenWithCustomAttributes.js,samples/README.md) |
|
152 | | Modify Push Configuration | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/modifyPushConfig.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/modifyPushConfig.js,samples/README.md) |
|
153 | | OpenTelemetry Tracing | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/openTelemetryTracing.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/openTelemetryTracing.js,samples/README.md) |
|
154 | | Publish Avro Records to a Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/publishAvroRecords.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishAvroRecords.js,samples/README.md) |
|
155 | | Publish Batched Messages | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/publishBatchedMessages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishBatchedMessages.js,samples/README.md) |
|
156 | | Publish Message | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/publishMessage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishMessage.js,samples/README.md) |
|
157 | | Publish Message With Custom Attributes | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/publishMessageWithCustomAttributes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishMessageWithCustomAttributes.js,samples/README.md) |
|
158 | | Publish Ordered Message | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/publishOrderedMessage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishOrderedMessage.js,samples/README.md) |
|
159 | | Publish Protobuf Messages to a Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/publishProtobufMessages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishProtobufMessages.js,samples/README.md) |
|
160 | | Publish With Retry Settings | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/publishWithRetrySettings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishWithRetrySettings.js,samples/README.md) |
|
161 | | Quickstart | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
|
162 | | Remove Dead Letter Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/removeDeadLetterPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/removeDeadLetterPolicy.js,samples/README.md) |
|
163 | | Resume Publish | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/resumePublish.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/resumePublish.js,samples/README.md) |
|
164 | | Set Subscription IAM Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/setSubscriptionPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/setSubscriptionPolicy.js,samples/README.md) |
|
165 | | Set Topic IAM Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/setTopicPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/setTopicPolicy.js,samples/README.md) |
|
166 | | Subscribe With Flow Control Settings | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/subscribeWithFlowControlSettings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/subscribeWithFlowControlSettings.js,samples/README.md) |
|
167 | | Synchronous Pull | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/synchronousPull.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/synchronousPull.js,samples/README.md) |
|
168 | | Synchronous Pull with delivery attempt. | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/synchronousPullWithDeliveryAttempts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/synchronousPullWithDeliveryAttempts.js,samples/README.md) |
|
169 | | Synchronous Pull With Lease Management | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/synchronousPullWithLeaseManagement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/synchronousPullWithLeaseManagement.js,samples/README.md) |
|
170 | | Test Subscription Permissions | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/testSubscriptionPermissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/testSubscriptionPermissions.js,samples/README.md) |
|
171 | | Test Topic Permissions | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/testTopicPermissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/testTopicPermissions.js,samples/README.md) |
|
172 | | Update Dead Letter Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/master/samples/updateDeadLetterPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/updateDeadLetterPolicy.js,samples/README.md) |
|
173 |
|
174 |
|
175 |
|
176 | The [Google Cloud Pub/Sub Node.js Client API Reference][client-docs] documentation
|
177 | also contains samples.
|
178 |
|
179 | ## Supported Node.js Versions
|
180 |
|
181 | Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/).
|
182 | Libraries are compatible with all current _active_ and _maintenance_ versions of
|
183 | Node.js.
|
184 |
|
185 | Client libraries targeting some end-of-life versions of Node.js are available, and
|
186 | can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
|
187 | The dist-tags follow the naming convention `legacy-(version)`.
|
188 |
|
189 | _Legacy Node.js versions are supported as a best effort:_
|
190 |
|
191 | * Legacy versions will not be tested in continuous integration.
|
192 | * Some security patches may not be able to be backported.
|
193 | * Dependencies will not be kept up-to-date, and features will not be backported.
|
194 |
|
195 | #### Legacy tags available
|
196 |
|
197 | * `legacy-8`: install client libraries from this dist-tag for versions
|
198 | compatible with Node.js 8.
|
199 |
|
200 | ## Versioning
|
201 |
|
202 | This library follows [Semantic Versioning](http://semver.org/).
|
203 |
|
204 |
|
205 | This library is considered to be **General Availability (GA)**. This means it
|
206 | is stable; the code surface will not change in backwards-incompatible ways
|
207 | unless absolutely necessary (e.g. because of critical security issues) or with
|
208 | an extensive deprecation period. Issues and requests against **GA** libraries
|
209 | are addressed with the highest priority.
|
210 |
|
211 |
|
212 |
|
213 |
|
214 |
|
215 | More Information: [Google Cloud Platform Launch Stages][launch_stages]
|
216 |
|
217 | [launch_stages]: https://cloud.google.com/terms/launch-stages
|
218 |
|
219 | ## Contributing
|
220 |
|
221 | Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-pubsub/blob/master/CONTRIBUTING.md).
|
222 |
|
223 | Please note that this `README.md`, the `samples/README.md`,
|
224 | and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
|
225 | are generated from a central template. To edit one of these files, make an edit
|
226 | to its template in this
|
227 | [directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library).
|
228 |
|
229 | ## License
|
230 |
|
231 | Apache Version 2.0
|
232 |
|
233 | See [LICENSE](https://github.com/googleapis/nodejs-pubsub/blob/master/LICENSE)
|
234 |
|
235 | [client-docs]: https://googleapis.dev/nodejs/pubsub/latest
|
236 | [product-docs]: https://cloud.google.com/pubsub/docs/
|
237 | [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
|
238 | [projects]: https://console.cloud.google.com/project
|
239 | [billing]: https://support.google.com/cloud/answer/6293499#enable-billing
|
240 | [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=pubsub.googleapis.com
|
241 | [auth]: https://cloud.google.com/docs/authentication/getting-started
|
242 |
|
\ | No newline at end of file |