Members
(constant) gapicConfig
Client JSON configuration object, loaded from
src/v1/schema_service_client_config.json
.
This file defines retry strategy and timeouts for all API methods in this library.
(constant) gapicConfig
Client JSON configuration object, loaded from
src/v1/subscriber_client_config.json
.
This file defines retry strategy and timeouts for all API methods in this library.
(constant) gapicConfig
Client JSON configuration object, loaded from
src/v1/publisher_client_config.json
.
This file defines retry strategy and timeouts for all API methods in this library.
Type Definitions
BatchOptions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
callOptions |
object |
<optional> |
Request configuration option, outlined here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html. |
|
maxMessages |
number |
<optional> |
3000 |
Maximum number of messages allowed in each batch sent. |
maxMilliseconds |
number |
<optional> |
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. |
BatchPublishOptions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
maxBytes |
number |
<optional> |
1 * 1024 * 1024 |
The maximum number of bytes to buffer before sending a payload. |
maxMessages |
number |
<optional> |
100 |
The maximum number of messages to buffer before sending a payload. |
maxMilliseconds |
number |
<optional> |
10 |
The maximum duration to wait before sending a payload. |
ClientConfig
Properties:
Name | Type | Attributes | Default | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
projectId |
string |
<optional> |
The project ID from the Google Developer's
Console, e.g. 'grape-spaceship-123'. We will also check the environment
variable |
|||||||||||||
keyFilename |
string |
<optional> |
Full path to the a .json, .pem, or .p12 key
downloaded from the Google Developers Console. If you provide a path to a
JSON file, the |
|||||||||||||
apiEndpoint |
string |
<optional> |
The |
|||||||||||||
email |
string |
<optional> |
Account email address. Required when using a .pem or .p12 keyFilename. |
|||||||||||||
credentials |
object |
<optional> |
Credentials object. Properties
|
|||||||||||||
autoRetry |
boolean |
<optional> |
true |
Automatically retry requests if the response is related to rate limits or certain intermittent server errors. We will exponentially backoff subsequent requests by default. |
||||||||||||
promise |
Constructor |
<optional> |
Custom promise module to use instead of native Promises. |
CreateSnapshotCallback(errnullable, snapshot, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
snapshot |
Snapshot |
The new Snapshot. |
|
apiResponse |
object |
The full API response. |
CreateSnapshotResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Snapshot |
The new Snapshot. |
1 |
object |
The full API response. |
CreateSubscriptionCallback(errnullable, Subscription, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
Subscription |
Subscription | ||
apiResponse |
object |
The full API response. |
CreateSubscriptionRequest
Options for creating a subscription.
See a Subscription resource.
Properties:
Name | Type | Attributes | Default | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
deadLetterPolicy |
DeadLetterPolicy |
<optional> |
A policy that specifies the conditions for dead lettering messages in this subscription. |
||||||||||||||||
flowControl |
object |
<optional> |
Flow control configurations for receiving messages. Note that these options do not persist across subscription instances. Properties
|
||||||||||||||||
gaxOpts |
object |
<optional> |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html. |
||||||||||||||||
messageRetentionDuration |
number | google.protobuf.Duration |
<optional> |
Set this to override the default duration of 7 days. This value is expected in seconds. Acceptable values are in the range of 10 minutes and 7 days. |
||||||||||||||||
pushEndpoint |
string |
<optional> |
A URL to a custom endpoint that messages should be pushed to. |
||||||||||||||||
oidcToken |
object |
<optional> |
If specified, Pub/Sub will generate and
attach an OIDC JWT token as an |
||||||||||||||||
retainAckedMessages |
boolean |
<optional> |
false |
If set, acked messages
are retained in the subscription's backlog for the length of time
specified by |
|||||||||||||||
expirationPolicy |
ExpirationPolicy |
<optional> |
A policy that specifies the conditions for this subscription's expiration. |
CreateSubscriptionResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Subscription |
The new Subscription. |
1 |
object |
The full API response. |
CreateTopicCallback(errnullable, topic, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
topic |
Topic |
The new Topic. |
|
apiResponse |
object |
The full API response. |
CreateTopicResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Topic |
The new Topic. |
1 |
object |
The full API response. |
EmptyCallback() → {Promise.<void>}
Closes out this object, releasing any server connections. Note that once you close a PubSub object, it may not be used again. Any pending operations (e.g. queued publish messages) will fail. If you have topic or subscription objects that may have pending operations, you should call close() on those first if you want any pending messages to be delivered correctly. The PubSub class doesn't track those.
Returns:
Type | Description |
---|---|
Promise.<void> |
ExpirationPolicy
A policy that specifies the conditions for this subscription's expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expirationPolicy is not set, a default policy with ttl of 31 days will be used. The minimum allowed value for expirationPolicy.ttl is 1 day.
Properties:
Name | Type | Description |
---|---|---|
ttl |
google.protobuf.Duration |
Specifies the "time-to-live"
duration for an associated resource. The resource expires if it is not
active for a period of |
FlowControlOptions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
allowExcessMessages |
boolean |
<optional> |
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. |
maxBytes |
number |
<optional> |
104857600 |
The desired amount of memory to allow message data to consume. (Default: 100MB) It's possible that this value will be exceeded, since messages are received in batches. |
maxExtension |
number |
<optional> |
60 |
The maximum duration (in seconds) to extend the message deadline before redelivering. |
maxMessages |
number |
<optional> |
1000 |
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. |
GetPolicyCallback(errnullable, acl)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
acl |
object |
The policy. |
GetPolicyResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The policy. |
GetSnapshotsCallback(errnullable, snapshots, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
snapshots |
Array.<Snapshot> |
Array of Snapshot instances. |
|
apiResponse |
object |
The full API response. |
GetSnapshotsRequest
Query object for listing snapshots.
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
autoPaginate |
boolean |
<optional> |
true |
Have pagination handled automatically. |
options.gaxOpts |
object |
<optional> |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html. |
|
options.pageSize |
number |
<optional> |
Maximum number of results to return. |
|
options.pageToken |
string |
<optional> |
Page token. |
GetSnapshotsResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Array.<Snapshot> |
Array of Snapshot instances. |
1 |
object |
The full API response. |
GetSubscriptionCallback(errnullable, subscription, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
subscription |
Subscription |
The Subscription. |
|
apiResponse |
object |
The full API response. |
GetSubscriptionMetadataCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
GetSubscriptionMetadataResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
GetSubscriptionResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Subscription |
The Subscription. |
1 |
object |
The full API response. |
GetSubscriptionsCallback(errnullable, subscriptions, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
subscriptions |
Array.<Subscription> |
Array of Subscription instances. |
|
apiResponse |
object |
The full API response. |
GetSubscriptionsRequest
Query object for listing subscriptions.
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
autoPaginate |
boolean |
<optional> |
true |
Have pagination handled automatically. |
options.gaxOpts |
object |
<optional> |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html. |
|
options.pageSize |
number |
<optional> |
Maximum number of results to return. |
|
options.pageToken |
string |
<optional> |
Page token. |
GetSubscriptionsResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Array.<Subscription> |
Array of Subscription instances. |
1 |
object |
The full API response. |
GetTopicCallback(errnullable, topic, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
topic |
Topic |
The Topic. |
|
apiResponse |
object |
The full API response. |
GetTopicMetadataCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
GetTopicMetadataResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
GetTopicResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Topic |
The Topic. |
1 |
object |
The full API response. |
GetTopicsCallback(errnullable, topics, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
topics |
Array.<Topic> |
Array of Topic instances. |
|
apiResponse |
object |
The full API response. |
GetTopicsRequest
Query object for listing topics.
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
autoPaginate |
boolean |
<optional> |
true |
Have pagination handled automatically. |
options.gaxOpts |
object |
<optional> |
Request configuration options, outlined here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html. |
|
options.pageSize |
number |
<optional> |
Maximum number of results to return. |
|
options.pageToken |
string |
<optional> |
Page token. |
GetTopicsResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Array.<Topic> |
Array of Topic instances. |
1 |
object |
The full API response. |
MessageOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
data |
buffer |
<optional> |
The message data. |
json |
object |
<optional> |
Convenience property to publish JSON data. This will transform the provided JSON into a Buffer before publishing. Subscription objects will always return message data in the form of a Buffer, so any JSON published will require manual deserialization. |
attributes |
object.<string, string> |
<optional> |
Attributes for this message. |
orderingKey |
string |
<optional> |
A message ordering key. |
MessageStreamOptions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
highWaterMark |
number |
<optional> |
0 |
Configures the Buffer level for all underlying streams. See https://nodejs.org/en/docs/guides/backpressuring-in-streams/ for more details. |
maxStreams |
number |
<optional> |
5 |
Number of streaming connections to make. |
timeout |
number |
<optional> |
300000 |
Timeout for establishing a connection. |
ModifyPushConfigCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
ModifyPushConfigResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
PermissionsResponse
A subset of TestPermissionsRequest.permissions that the caller is allowed.
PublishOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
batching |
BatchPublishOptions |
<optional> |
The maximum number of bytes to buffer before sending a payload. |
gaxOpts |
object |
<optional> |
Request configuration options, outlined here. |
messageOrdering |
boolean |
<optional> |
If true, messages published with the same order key in Message will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order. |
SeekCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
SeekResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
SetPolicyCallback(errnullable, acl)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
acl |
object |
The policy. |
SetPolicyResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The policy. |
SetSubscriptionMetadataCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
SetSubscriptionMetadataResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
SetTopicMetadataCallback(errnullable, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
apiResponse |
object |
The full API response. |
SetTopicMetadataResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
object |
The full API response. |
SubscriberOptions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
ackDeadline |
number |
<optional> |
10 |
Acknowledge deadline in seconds. If left unset the initial value will be 10 seconds, but it will evolve into the 99th percentile time it takes to acknowledge a message. |
batching |
BatchOptions |
<optional> |
Request batching options. |
|
flowControl |
FlowControlOptions |
<optional> |
Flow control options. |
|
useLegacyFlowControl |
boolean |
<optional> |
Disables enforcing flow control settings at the Cloud PubSub server and uses the less accurate method of only enforcing flow control at the client side. |
|
streamingOptions |
MessageStreamOptions |
<optional> |
Streaming options. |
SubscriptionDetachedCallback(errnullable, exists)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
exists |
boolean |
Whether the subscription is detached. |
SubscriptionDetachedResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
boolean |
Whether the subscription is detached. |
SubscriptionExistsCallback(errnullable, exists)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
exists |
boolean |
Whether the subscription exists. |
SubscriptionExistsResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
boolean |
Whether the subscription exists |
TestIamPermissionsCallback(errnullable, permissions, apiResponse)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
permissions |
TestIamPermissionsAPIResponse |
A subset of permissions that the caller is allowed. |
|
apiResponse |
PermissionsResponse |
The full API response. |
TestIamPermissionsResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
Array.<object> |
A subset of permissions that the caller is allowed. |
1 |
PermissionsResponse |
The full API response. |
TopicExistsCallback(errnullable, exists)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<nullable> |
Request error, if any. |
exists |
boolean |
Whether the topic exists. |
TopicExistsResponse
Properties:
Name | Type | Description |
---|---|---|
0 |
boolean |
Whether the topic exists |