@google-cloud/pubsub
Advanced tools
Comparing version 0.30.2 to 0.30.3
@@ -19,2 +19,8 @@ /*! | ||
import { Message, Subscriber } from './subscriber'; | ||
export interface FlowControlOptions { | ||
allowExcessMessages?: boolean; | ||
maxBytes?: number; | ||
maxExtension?: number; | ||
maxMessages?: number; | ||
} | ||
/** | ||
@@ -39,8 +45,2 @@ * @typedef {object} FlowControlOptions | ||
*/ | ||
export interface FlowControlOptions { | ||
allowExcessMessages?: boolean; | ||
maxBytes?: number; | ||
maxExtension?: number; | ||
maxMessages?: number; | ||
} | ||
/** | ||
@@ -47,0 +47,0 @@ * Manages a Subscribers inventory while auto-magically extending the message |
@@ -21,2 +21,21 @@ "use strict"; | ||
/** | ||
* @typedef {object} FlowControlOptions | ||
* @property {boolean} [allowExcessMessages=true] PubSub delivers messages in | ||
* batches with no way to configure the batch size. Sometimes this can be | ||
* overwhelming if you only want to process a few messages at a time. | ||
* Setting this option to false will make the client manage any excess | ||
* messages until you're ready for them. This will prevent them from being | ||
* redelivered and make the maxMessages option behave more predictably. | ||
* @property {number} [maxBytes] The desired amount of memory to allow message | ||
* data to consume, defaults to 20% of available memory. Its possible that | ||
* this value will be exceeded since messages are received in batches. | ||
* @property {number} [maxExtension=Infinity] The maximum duration (in seconds) | ||
* to extend the message deadline before redelivering. | ||
* @property {number} [maxMessages=100] The desired number of messages to allow | ||
* in memory before pausing the message stream. Unless allowExcessMessages | ||
* is set to false, it is very likely that this value will be exceeded since | ||
* any given message batch could contain a greater number of messages than | ||
* the desired amount of messages. | ||
*/ | ||
/** | ||
* Manages a Subscribers inventory while auto-magically extending the message | ||
@@ -23,0 +42,0 @@ * deadlines. |
@@ -22,12 +22,2 @@ /*! | ||
declare type QueuedMessages = Array<[string, number?]>; | ||
/** | ||
* @typedef {object} BatchOptions | ||
* @property {object} [callOptions] Request configuration option, outlined | ||
* here: {@link https://googleapis.github.io/gax-nodejs/CallSettings.html}. | ||
* @property {number} [maxMessages=3000] Maximum number of messages allowed in | ||
* each batch sent. | ||
* @property {number} [maxMilliseconds=100] Maximum duration to wait before | ||
* sending a batch. Batches can be sent earlier if the maxMessages option | ||
* is met before the configured duration has passed. | ||
*/ | ||
export interface BatchOptions { | ||
@@ -54,2 +44,12 @@ callOptions?: CallOptions; | ||
/** | ||
* @typedef {object} BatchOptions | ||
* @property {object} [callOptions] Request configuration option, outlined | ||
* here: {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html}. | ||
* @property {number} [maxMessages=3000] Maximum number of messages allowed in | ||
* each batch sent. | ||
* @property {number} [maxMilliseconds=100] Maximum duration to wait before | ||
* sending a batch. Batches can be sent earlier if the maxMessages option | ||
* is met before the configured duration has passed. | ||
*/ | ||
/** | ||
* Class for buffering ack/modAck requests. | ||
@@ -56,0 +56,0 @@ * |
@@ -38,2 +38,12 @@ "use strict"; | ||
/** | ||
* @typedef {object} BatchOptions | ||
* @property {object} [callOptions] Request configuration option, outlined | ||
* here: {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html}. | ||
* @property {number} [maxMessages=3000] Maximum number of messages allowed in | ||
* each batch sent. | ||
* @property {number} [maxMilliseconds=100] Maximum duration to wait before | ||
* sending a batch. Batches can be sent earlier if the maxMessages option | ||
* is met before the configured duration has passed. | ||
*/ | ||
/** | ||
* Class for buffering ack/modAck requests. | ||
@@ -40,0 +50,0 @@ * |
@@ -46,2 +46,7 @@ /*! | ||
} | ||
export interface MessageStreamOptions { | ||
highWaterMark?: number; | ||
maxStreams?: number; | ||
timeout?: number; | ||
} | ||
/** | ||
@@ -56,7 +61,2 @@ * @typedef {object} MessageStreamOptions | ||
*/ | ||
export interface MessageStreamOptions { | ||
highWaterMark?: number; | ||
maxStreams?: number; | ||
timeout?: number; | ||
} | ||
/** | ||
@@ -63,0 +63,0 @@ * Streaming class used to manage multiple StreamingPull requests. |
@@ -74,2 +74,11 @@ "use strict"; | ||
/** | ||
* @typedef {object} MessageStreamOptions | ||
* @property {number} [highWaterMark=0] Configures the Buffer level for all | ||
* underlying streams. See | ||
* {@link https://nodejs.org/en/docs/guides/backpressuring-in-streams/} for | ||
* more details. | ||
* @property {number} [maxStreams=5] Number of streaming connections to make. | ||
* @property {number} [timeout=300000] Timeout for establishing a connection. | ||
*/ | ||
/** | ||
* Streaming class used to manage multiple StreamingPull requests. | ||
@@ -76,0 +85,0 @@ * |
@@ -20,8 +20,7 @@ // Copyright 2019 Google LLC | ||
* @property {string[]} allowedPersistenceRegions | ||
* The list of GCP region IDs where messages that are published to the topic | ||
* A list of IDs of GCP regions where messages that are published to the topic | ||
* may be persisted in storage. Messages published by publishers running in | ||
* non-allowed GCP regions (or running outside of GCP altogether) will be | ||
* routed for storage in one of the allowed regions. An empty list indicates a | ||
* misconfiguration at the project or organization level, which will result in | ||
* all Publish operations failing. | ||
* routed for storage in one of the allowed regions. An empty list means that | ||
* no regions are allowed, and is not a valid configuration. | ||
* | ||
@@ -52,8 +51,5 @@ * @typedef MessageStoragePolicy | ||
* @property {Object} messageStoragePolicy | ||
* Policy constraining how messages published to the topic may be stored. It | ||
* is determined when the topic is created based on the policy configured at | ||
* the project level. It must not be set by the caller in the request to | ||
* CreateTopic or to UpdateTopic. This field will be populated in the | ||
* responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the | ||
* response, then no constraints are in effect. | ||
* Policy constraining the set of Google Cloud Platform regions where messages | ||
* published to the topic may be stored. If not present, then no constraints | ||
* are in effect. | ||
* | ||
@@ -67,5 +63,2 @@ * This object should have the same structure as [MessageStoragePolicy]{@link google.pubsub.v1.MessageStoragePolicy} | ||
* The expected format is `projects/* /locations/* /keyRings/* /cryptoKeys/*`. | ||
* <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This | ||
* API might be changed in backward-incompatible ways and is not recommended | ||
* for production use. It is not subject to any SLA or deprecation policy. | ||
* | ||
@@ -471,15 +464,12 @@ * @typedef Topic | ||
* @property {Object.<string, string>} attributes | ||
* Endpoint configuration attributes. | ||
* Endpoint configuration attributes that can be used to control different | ||
* aspects of the message delivery. | ||
* | ||
* Every endpoint has a set of API supported attributes that can be used to | ||
* control different aspects of the message delivery. | ||
* | ||
* The currently supported attribute is `x-goog-version`, which you can | ||
* The only currently supported attribute is `x-goog-version`, which you can | ||
* use to change the format of the pushed message. This attribute | ||
* indicates the version of the data expected by the endpoint. This | ||
* controls the shape of the pushed message (i.e., its fields and metadata). | ||
* The endpoint version is based on the version of the Pub/Sub API. | ||
* | ||
* If not present during the `CreateSubscription` call, it will default to | ||
* the version of the API used to make such call. If not present during a | ||
* the version of the Pub/Sub API used to make such call. If not present in a | ||
* `ModifyPushConfig` call, its value will not be changed. `GetSubscription` | ||
@@ -489,3 +479,3 @@ * calls will always return a valid version, even if the subscription was | ||
* | ||
* The possible values for this attribute are: | ||
* The only supported values for the `x-goog-version` attribute are: | ||
* | ||
@@ -495,2 +485,5 @@ * * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. | ||
* | ||
* For example: | ||
* <pre><code>attributes { "x-goog-version": "v1" } </code></pre> | ||
* | ||
* @property {Object} oidcToken | ||
@@ -497,0 +490,0 @@ * If specified, Pub/Sub will generate and attach an OIDC JWT token as an |
@@ -56,3 +56,3 @@ // Copyright 2019 Google LLC | ||
* of native Promises. | ||
* @param {string} [options.servicePath] - The domain name of the | ||
* @param {string} [options.apiEndpoint] - The domain name of the | ||
* API remote host. | ||
@@ -310,8 +310,5 @@ */ | ||
* @param {Object} [request.messageStoragePolicy] | ||
* Policy constraining how messages published to the topic may be stored. It | ||
* is determined when the topic is created based on the policy configured at | ||
* the project level. It must not be set by the caller in the request to | ||
* CreateTopic or to UpdateTopic. This field will be populated in the | ||
* responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the | ||
* response, then no constraints are in effect. | ||
* Policy constraining the set of Google Cloud Platform regions where messages | ||
* published to the topic may be stored. If not present, then no constraints | ||
* are in effect. | ||
* | ||
@@ -324,5 +321,2 @@ * This object should have the same structure as [MessageStoragePolicy]{@link google.pubsub.v1.MessageStoragePolicy} | ||
* The expected format is `projects/* /locations/* /keyRings/* /cryptoKeys/*`. | ||
* <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This | ||
* API might be changed in backward-incompatible ways and is not recommended | ||
* for production use. It is not subject to any SLA or deprecation policy. | ||
* @param {Object} [options] | ||
@@ -362,2 +356,3 @@ * Optional parameters. You can override the default settings for this call, e.g, timeout, | ||
} | ||
request = request || {}; | ||
options = options || {}; | ||
@@ -432,2 +427,3 @@ options.otherArgs = options.otherArgs || {}; | ||
} | ||
request = request || {}; | ||
options = options || {}; | ||
@@ -501,2 +497,3 @@ options.otherArgs = options.otherArgs || {}; | ||
} | ||
request = request || {}; | ||
options = options || {}; | ||
@@ -556,2 +553,3 @@ options.otherArgs = options.otherArgs || {}; | ||
} | ||
request = request || {}; | ||
options = options || {}; | ||
@@ -659,2 +657,3 @@ options.otherArgs = options.otherArgs || {}; | ||
} | ||
request = request || {}; | ||
options = options || {}; | ||
@@ -818,2 +817,3 @@ options.otherArgs = options.otherArgs || {}; | ||
} | ||
request = request || {}; | ||
options = options || {}; | ||
@@ -929,2 +929,3 @@ options.otherArgs = options.otherArgs || {}; | ||
} | ||
request = request || {}; | ||
options = options || {}; | ||
@@ -997,2 +998,3 @@ options.otherArgs = options.otherArgs || {}; | ||
} | ||
request = request || {}; | ||
options = options || {}; | ||
@@ -1059,2 +1061,3 @@ options.otherArgs = options.otherArgs || {}; | ||
} | ||
request = request || {}; | ||
options = options || {}; | ||
@@ -1130,2 +1133,3 @@ options.otherArgs = options.otherArgs || {}; | ||
} | ||
request = request || {}; | ||
options = options || {}; | ||
@@ -1132,0 +1136,0 @@ options.otherArgs = options.otherArgs || {}; |
@@ -7,2 +7,9 @@ # Changelog | ||
### [0.30.3](https://www.github.com/googleapis/nodejs-pubsub/compare/v0.30.2...v0.30.3) (2019-08-03) | ||
### Bug Fixes | ||
* allow calls with no request, add JSON proto ([1e73a69](https://www.github.com/googleapis/nodejs-pubsub/commit/1e73a69)) | ||
### [0.30.2](https://www.github.com/googleapis/nodejs-pubsub/compare/v0.30.1...v0.30.2) (2019-07-30) | ||
@@ -9,0 +16,0 @@ |
{ | ||
"name": "@google-cloud/pubsub", | ||
"description": "Cloud Pub/Sub Client Library for Node.js", | ||
"version": "0.30.2", | ||
"version": "0.30.3", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "author": "Google Inc.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
1476050
113
23024