Package @google-cloud/pubsub (4.1.1)

Classes

AckError

Thrown when an error is detected in an ack/nack/modack call, when exactly-once delivery is enabled on the subscription. This will only be thrown for actual errors that can't be retried.

DebugMessage

Represents a debug message the user might want to print out for logging while debugging or whatnot. These will always come by way of the 'error' channel on streams or other event emitters. It's completely fine to ignore them, as some will just be verbose logging info, but they may help figure out what's going wrong. Support may also ask you to catch these channels, which you can do like so:

subscription.on('debug', msg => console.log(msg.message));

These values are _not_ guaranteed to remain stable, even within a major version, so don't depend on them for your program logic. Debug outputs may be added or removed at any time, without warning.

Duration

Duration class with an interface similar to the tc39 Temporal proposal. Since it's not fully finalized, and polyfills have inconsistent compatibility, for now this shim class will be used to set durations in Pub/Sub.

This class will remain here for at least the next major version, eventually to be replaced by the tc39 Temporal built-in.

https://tc39.es/proposal-temporal/docs/duration.html

IAM

[IAM (Identity and Access Management)](https://cloud.google.com/pubsub/access_control) allows you to set permissions on individual resources and offers a wider range of roles: editor, owner, publisher, subscriber, and viewer. This gives you greater flexibility and allows you to set more fine-grained access control.

For example: * Grant access on a per-topic or per-subscription basis, rather than for the whole Cloud project. * Grant access with limited capabilities, such as to only publish messages to a topic, or to only to consume messages from a subscription, but not to delete the topic or subscription.

*The IAM access control features described in this document are Beta, including the API methods to get and set IAM policies, and to test IAM permissions. Cloud Pub/Sub's use of IAM features is not covered by any SLA or deprecation policy, and may be subject to backward-incompatible changes.*

Message

Message objects provide a simple interface for users to get message data and acknowledge the message.

protos.google.api.ClientLibrarySettings

Represents a ClientLibrarySettings.

protos.google.api.CommonLanguageSettings

Represents a CommonLanguageSettings.

protos.google.api.CppSettings

Represents a CppSettings.

protos.google.api.CustomHttpPattern

Represents a CustomHttpPattern.

protos.google.api.DotnetSettings

Represents a DotnetSettings.

protos.google.api.GoSettings

Represents a GoSettings.

protos.google.api.Http

Represents a Http.

protos.google.api.HttpRule

Represents a HttpRule.

protos.google.api.JavaSettings

Represents a JavaSettings.

protos.google.api.MethodSettings

Represents a MethodSettings.

protos.google.api.MethodSettings.LongRunning

Represents a LongRunning.

protos.google.api.NodeSettings

Represents a NodeSettings.

protos.google.api.PhpSettings

Represents a PhpSettings.

protos.google.api.Publishing

Represents a Publishing.

protos.google.api.PythonSettings

Represents a PythonSettings.

protos.google.api.ResourceDescriptor

Represents a ResourceDescriptor.

protos.google.api.ResourceReference

Represents a ResourceReference.

protos.google.api.RubySettings

Represents a RubySettings.

protos.google.protobuf.DescriptorProto

Represents a DescriptorProto.

protos.google.protobuf.DescriptorProto.ExtensionRange

Represents an ExtensionRange.

protos.google.protobuf.DescriptorProto.ReservedRange

Represents a ReservedRange.

protos.google.protobuf.Duration

Represents a Duration.

protos.google.protobuf.Empty

Represents an Empty.

protos.google.protobuf.EnumDescriptorProto

Represents an EnumDescriptorProto.

protos.google.protobuf.EnumDescriptorProto.EnumReservedRange

Represents an EnumReservedRange.

protos.google.protobuf.EnumOptions

Represents an EnumOptions.

protos.google.protobuf.EnumValueDescriptorProto

Represents an EnumValueDescriptorProto.

protos.google.protobuf.EnumValueOptions

Represents an EnumValueOptions.

protos.google.protobuf.ExtensionRangeOptions

Represents an ExtensionRangeOptions.

protos.google.protobuf.ExtensionRangeOptions.Declaration

Represents a Declaration.

protos.google.protobuf.FeatureSet

Represents a FeatureSet.

protos.google.protobuf.FieldDescriptorProto

Represents a FieldDescriptorProto.

protos.google.protobuf.FieldMask

Represents a FieldMask.

protos.google.protobuf.FieldOptions

Represents a FieldOptions.

protos.google.protobuf.FieldOptions.EditionDefault

Represents an EditionDefault.

protos.google.protobuf.FileDescriptorProto

Represents a FileDescriptorProto.

protos.google.protobuf.FileDescriptorSet

Represents a FileDescriptorSet.

protos.google.protobuf.FileOptions

Represents a FileOptions.

protos.google.protobuf.GeneratedCodeInfo

Represents a GeneratedCodeInfo.

protos.google.protobuf.GeneratedCodeInfo.Annotation

Represents an Annotation.

protos.google.protobuf.MessageOptions

Represents a MessageOptions.

protos.google.protobuf.MethodDescriptorProto

Represents a MethodDescriptorProto.

protos.google.protobuf.MethodOptions

Represents a MethodOptions.

protos.google.protobuf.OneofDescriptorProto

Represents an OneofDescriptorProto.

protos.google.protobuf.OneofOptions

Represents an OneofOptions.

protos.google.protobuf.ServiceDescriptorProto

Represents a ServiceDescriptorProto.

protos.google.protobuf.ServiceOptions

Represents a ServiceOptions.

protos.google.protobuf.SourceCodeInfo

Represents a SourceCodeInfo.

protos.google.protobuf.SourceCodeInfo.Location

Represents a Location.

protos.google.protobuf.Timestamp

Represents a Timestamp.

protos.google.protobuf.UninterpretedOption

Represents an UninterpretedOption.

protos.google.protobuf.UninterpretedOption.NamePart

Represents a NamePart.

protos.google.pubsub.v1.AcknowledgeRequest

Represents an AcknowledgeRequest.

protos.google.pubsub.v1.BigQueryConfig

Represents a BigQueryConfig.

protos.google.pubsub.v1.CloudStorageConfig

Represents a CloudStorageConfig.

protos.google.pubsub.v1.CloudStorageConfig.AvroConfig

Represents an AvroConfig.

protos.google.pubsub.v1.CloudStorageConfig.TextConfig

Represents a TextConfig.

protos.google.pubsub.v1.CommitSchemaRequest

Represents a CommitSchemaRequest.

protos.google.pubsub.v1.CreateSchemaRequest

Represents a CreateSchemaRequest.

protos.google.pubsub.v1.CreateSnapshotRequest

Represents a CreateSnapshotRequest.

protos.google.pubsub.v1.DeadLetterPolicy

Represents a DeadLetterPolicy.

protos.google.pubsub.v1.DeleteSchemaRequest

Represents a DeleteSchemaRequest.

protos.google.pubsub.v1.DeleteSchemaRevisionRequest

Represents a DeleteSchemaRevisionRequest.

protos.google.pubsub.v1.DeleteSnapshotRequest

Represents a DeleteSnapshotRequest.

protos.google.pubsub.v1.DeleteSubscriptionRequest

Represents a DeleteSubscriptionRequest.

protos.google.pubsub.v1.DeleteTopicRequest

Represents a DeleteTopicRequest.

protos.google.pubsub.v1.DetachSubscriptionRequest

Represents a DetachSubscriptionRequest.

protos.google.pubsub.v1.DetachSubscriptionResponse

Represents a DetachSubscriptionResponse.

protos.google.pubsub.v1.ExpirationPolicy

Represents an ExpirationPolicy.

protos.google.pubsub.v1.GetSchemaRequest

Represents a GetSchemaRequest.

protos.google.pubsub.v1.GetSnapshotRequest

Represents a GetSnapshotRequest.

protos.google.pubsub.v1.GetSubscriptionRequest

Represents a GetSubscriptionRequest.

protos.google.pubsub.v1.GetTopicRequest

Represents a GetTopicRequest.

protos.google.pubsub.v1.ListSchemaRevisionsRequest

Represents a ListSchemaRevisionsRequest.

protos.google.pubsub.v1.ListSchemaRevisionsResponse

Represents a ListSchemaRevisionsResponse.

protos.google.pubsub.v1.ListSchemasRequest

Represents a ListSchemasRequest.

protos.google.pubsub.v1.ListSchemasResponse

Represents a ListSchemasResponse.

protos.google.pubsub.v1.ListSnapshotsRequest

Represents a ListSnapshotsRequest.

protos.google.pubsub.v1.ListSnapshotsResponse

Represents a ListSnapshotsResponse.

protos.google.pubsub.v1.ListSubscriptionsRequest

Represents a ListSubscriptionsRequest.

protos.google.pubsub.v1.ListSubscriptionsResponse

Represents a ListSubscriptionsResponse.

protos.google.pubsub.v1.ListTopicSnapshotsRequest

Represents a ListTopicSnapshotsRequest.

protos.google.pubsub.v1.ListTopicSnapshotsResponse

Represents a ListTopicSnapshotsResponse.

protos.google.pubsub.v1.ListTopicsRequest

Represents a ListTopicsRequest.

protos.google.pubsub.v1.ListTopicsResponse

Represents a ListTopicsResponse.

protos.google.pubsub.v1.ListTopicSubscriptionsRequest

Represents a ListTopicSubscriptionsRequest.

protos.google.pubsub.v1.ListTopicSubscriptionsResponse

Represents a ListTopicSubscriptionsResponse.

protos.google.pubsub.v1.MessageStoragePolicy

Represents a MessageStoragePolicy.

protos.google.pubsub.v1.ModifyAckDeadlineRequest

Represents a ModifyAckDeadlineRequest.

protos.google.pubsub.v1.ModifyPushConfigRequest

Represents a ModifyPushConfigRequest.

protos.google.pubsub.v1.Publisher

Represents a Publisher

protos.google.pubsub.v1.PublishRequest

Represents a PublishRequest.

protos.google.pubsub.v1.PublishResponse

Represents a PublishResponse.

protos.google.pubsub.v1.PubsubMessage

Represents a PubsubMessage.

protos.google.pubsub.v1.PullRequest

Represents a PullRequest.

protos.google.pubsub.v1.PullResponse

Represents a PullResponse.

protos.google.pubsub.v1.PushConfig

Represents a PushConfig.

protos.google.pubsub.v1.PushConfig.NoWrapper

Represents a NoWrapper.

protos.google.pubsub.v1.PushConfig.OidcToken

Represents an OidcToken.

protos.google.pubsub.v1.PushConfig.PubsubWrapper

Represents a PubsubWrapper.

protos.google.pubsub.v1.ReceivedMessage

Represents a ReceivedMessage.

protos.google.pubsub.v1.RetryPolicy

Represents a RetryPolicy.

protos.google.pubsub.v1.RollbackSchemaRequest

Represents a RollbackSchemaRequest.

protos.google.pubsub.v1.Schema

Represents a Schema.

protos.google.pubsub.v1.SchemaService

Represents a SchemaService

protos.google.pubsub.v1.SchemaSettings

Represents a SchemaSettings.

protos.google.pubsub.v1.SeekRequest

Represents a SeekRequest.

protos.google.pubsub.v1.SeekResponse

Represents a SeekResponse.

protos.google.pubsub.v1.Snapshot

Represents a Snapshot.

protos.google.pubsub.v1.StreamingPullRequest

Represents a StreamingPullRequest.

protos.google.pubsub.v1.StreamingPullResponse

Represents a StreamingPullResponse.

protos.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation

Represents an AcknowledgeConfirmation.

protos.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation

Represents a ModifyAckDeadlineConfirmation.

protos.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties

Represents a SubscriptionProperties.

protos.google.pubsub.v1.Subscriber

Represents a Subscriber

protos.google.pubsub.v1.Subscription

Represents a Subscription.

protos.google.pubsub.v1.Topic

Represents a Topic.

protos.google.pubsub.v1.UpdateSnapshotRequest

Represents an UpdateSnapshotRequest.

protos.google.pubsub.v1.UpdateSubscriptionRequest

Represents an UpdateSubscriptionRequest.

protos.google.pubsub.v1.UpdateTopicRequest

Represents an UpdateTopicRequest.

protos.google.pubsub.v1.ValidateMessageRequest

Represents a ValidateMessageRequest.

protos.google.pubsub.v1.ValidateMessageResponse

Represents a ValidateMessageResponse.

protos.google.pubsub.v1.ValidateSchemaRequest

Represents a ValidateSchemaRequest.

protos.google.pubsub.v1.ValidateSchemaResponse

Represents a ValidateSchemaResponse.

PublishError

Exception to be thrown during failed ordered publish.

Error

PubSub

[Cloud Pub/Sub](https://developers.google.com/pubsub/overview) is a reliable, many-to-many, asynchronous messaging service from Cloud Platform.

Schema

A Schema object allows you to interact with a Cloud Pub/Sub schema.

This should only be instantiated by the PubSub class. To obtain an instance for end user usage, call pubsub.schema().

Snapshot

A Snapshot object will give you access to your Cloud Pub/Sub snapshot.

Snapshots are sometimes retrieved when using various methods:


Snapshots may be created with:

  • You can use snapshots to seek a subscription to a specific point in time.

-

Subscription

A Subscription object will give you access to your Cloud Pub/Sub subscription.

Subscriptions are sometimes retrieved when using various methods:

Subscription objects may be created directly with:

All Subscription objects are instances of an [EventEmitter](http://nodejs.org/api/events.html). The subscription will pull for messages automatically as long as there is at least one listener assigned for the message event. Available events:

Upon receipt of a message: on(event: 'message', listener: (message: Message) => void): this;

Upon receipt of an error: on(event: 'error', listener: (error: Error) => void): this;

Upon receipt of a (non-fatal) debug warning: on(event: 'debug', listener: (msg: DebugMessage) => void): this;

Upon the closing of the subscriber: on(event: 'close', listener: Function): this;

By default Subscription objects allow you to process 100 messages at the same time. You can fine tune this value by adjusting the options.flowControl.maxMessages option.

If your subscription is seeing more re-deliveries than preferable, you might try increasing your options.ackDeadline value or decreasing the options.streamingOptions.maxStreams value.

Subscription objects handle ack management, by automatically extending the ack deadline while the message is being processed, to then issue the ack or nack of such message when the processing is done. **Note:** message redelivery is still possible.

By default each PubSub instance can handle 100 open streams, with default options this translates to less than 20 Subscriptions per PubSub instance. If you wish to create more Subscriptions than that, you can either create multiple PubSub instances or lower the options.streamingOptions.maxStreams value on each Subscription object.

Topic

A Topic object allows you to interact with a Cloud Pub/Sub topic.

v1.PublisherClient

The service that an application uses to manipulate topics, and to send messages to a topic. v1

v1.SchemaServiceClient

Service for doing schema-related operations. v1

v1.SubscriberClient

The service that an application uses to manipulate subscriptions and to consume messages from a subscription via the Pull method or by establishing a bi-directional stream using the StreamingPull method. v1

Interfaces

BatchPublishOptions

ClientConfig

DurationLike

Simplified interface analogous to the tc39 Temporal.Duration parameter to from(). This doesn't support the full gamut (years, days).

FlowControlOptions

FlowControlOptions {number} [maxOutstandingMessages] The maximum number of messages to buffer before publisher flow control kicks in. {number} [maxOutstandingBytes] The maximum number of bytes to buffer before publisher flow control kicks in.

IamPermissionsMap

Shows which IAM permissions is allowed. The key to this object are the IAM permissions (string) and the values are booleans, true if permissions are granted to the corresponding key.

PageOptions

protos.google.api.IClientLibrarySettings

Properties of a ClientLibrarySettings.

protos.google.api.ICommonLanguageSettings

Properties of a CommonLanguageSettings.

protos.google.api.ICppSettings

Properties of a CppSettings.

protos.google.api.ICustomHttpPattern

Properties of a CustomHttpPattern.

protos.google.api.IDotnetSettings

Properties of a DotnetSettings.

protos.google.api.IGoSettings

Properties of a GoSettings.

protos.google.api.IHttp

Properties of a Http.

protos.google.api.IHttpRule

Properties of a HttpRule.

protos.google.api.IJavaSettings

Properties of a JavaSettings.

protos.google.api.IMethodSettings

Properties of a MethodSettings.

protos.google.api.INodeSettings

Properties of a NodeSettings.

protos.google.api.IPhpSettings

Properties of a PhpSettings.

protos.google.api.IPublishing

Properties of a Publishing.

protos.google.api.IPythonSettings

Properties of a PythonSettings.

protos.google.api.IResourceDescriptor

Properties of a ResourceDescriptor.

protos.google.api.IResourceReference

Properties of a ResourceReference.

protos.google.api.IRubySettings

Properties of a RubySettings.

protos.google.api.MethodSettings.ILongRunning

Properties of a LongRunning.

protos.google.protobuf.DescriptorProto.IExtensionRange

Properties of an ExtensionRange.

protos.google.protobuf.DescriptorProto.IReservedRange

Properties of a ReservedRange.

protos.google.protobuf.EnumDescriptorProto.IEnumReservedRange

Properties of an EnumReservedRange.

protos.google.protobuf.ExtensionRangeOptions.IDeclaration

Properties of a Declaration.

protos.google.protobuf.FieldOptions.IEditionDefault

Properties of an EditionDefault.

protos.google.protobuf.GeneratedCodeInfo.IAnnotation

Properties of an Annotation.

protos.google.protobuf.IDescriptorProto

Properties of a DescriptorProto.

protos.google.protobuf.IDuration

Properties of a Duration.

protos.google.protobuf.IEmpty

Properties of an Empty.

protos.google.protobuf.IEnumDescriptorProto

Properties of an EnumDescriptorProto.

protos.google.protobuf.IEnumOptions

Properties of an EnumOptions.

protos.google.protobuf.IEnumValueDescriptorProto

Properties of an EnumValueDescriptorProto.

protos.google.protobuf.IEnumValueOptions

Properties of an EnumValueOptions.

protos.google.protobuf.IExtensionRangeOptions

Properties of an ExtensionRangeOptions.

protos.google.protobuf.IFeatureSet

Properties of a FeatureSet.

protos.google.protobuf.IFieldDescriptorProto

Properties of a FieldDescriptorProto.

protos.google.protobuf.IFieldMask

Properties of a FieldMask.

protos.google.protobuf.IFieldOptions

Properties of a FieldOptions.

protos.google.protobuf.IFileDescriptorProto

Properties of a FileDescriptorProto.

protos.google.protobuf.IFileDescriptorSet

Properties of a FileDescriptorSet.

protos.google.protobuf.IFileOptions

Properties of a FileOptions.

protos.google.protobuf.IGeneratedCodeInfo

Properties of a GeneratedCodeInfo.

protos.google.protobuf.IMessageOptions

Properties of a MessageOptions.

protos.google.protobuf.IMethodDescriptorProto

Properties of a MethodDescriptorProto.

protos.google.protobuf.IMethodOptions

Properties of a MethodOptions.

protos.google.protobuf.IOneofDescriptorProto

Properties of an OneofDescriptorProto.

protos.google.protobuf.IOneofOptions

Properties of an OneofOptions.

protos.google.protobuf.IServiceDescriptorProto

Properties of a ServiceDescriptorProto.

protos.google.protobuf.IServiceOptions

Properties of a ServiceOptions.

protos.google.protobuf.ISourceCodeInfo

Properties of a SourceCodeInfo.

protos.google.protobuf.ITimestamp

Properties of a Timestamp.

protos.google.protobuf.IUninterpretedOption

Properties of an UninterpretedOption.

protos.google.protobuf.SourceCodeInfo.ILocation

Properties of a Location.

protos.google.protobuf.UninterpretedOption.INamePart

Properties of a NamePart.

protos.google.pubsub.v1.CloudStorageConfig.IAvroConfig

Properties of an AvroConfig.

protos.google.pubsub.v1.CloudStorageConfig.ITextConfig

Properties of a TextConfig.

protos.google.pubsub.v1.IAcknowledgeRequest

Properties of an AcknowledgeRequest.

protos.google.pubsub.v1.IBigQueryConfig

Properties of a BigQueryConfig.

protos.google.pubsub.v1.ICloudStorageConfig

Properties of a CloudStorageConfig.

protos.google.pubsub.v1.ICommitSchemaRequest

Properties of a CommitSchemaRequest.

protos.google.pubsub.v1.ICreateSchemaRequest

Properties of a CreateSchemaRequest.

protos.google.pubsub.v1.ICreateSnapshotRequest

Properties of a CreateSnapshotRequest.

protos.google.pubsub.v1.IDeadLetterPolicy

Properties of a DeadLetterPolicy.

protos.google.pubsub.v1.IDeleteSchemaRequest

Properties of a DeleteSchemaRequest.

protos.google.pubsub.v1.IDeleteSchemaRevisionRequest

Properties of a DeleteSchemaRevisionRequest.

protos.google.pubsub.v1.IDeleteSnapshotRequest

Properties of a DeleteSnapshotRequest.

protos.google.pubsub.v1.IDeleteSubscriptionRequest

Properties of a DeleteSubscriptionRequest.

protos.google.pubsub.v1.IDeleteTopicRequest

Properties of a DeleteTopicRequest.

protos.google.pubsub.v1.IDetachSubscriptionRequest

Properties of a DetachSubscriptionRequest.

protos.google.pubsub.v1.IDetachSubscriptionResponse

Properties of a DetachSubscriptionResponse.

protos.google.pubsub.v1.IExpirationPolicy

Properties of an ExpirationPolicy.

protos.google.pubsub.v1.IGetSchemaRequest

Properties of a GetSchemaRequest.

protos.google.pubsub.v1.IGetSnapshotRequest

Properties of a GetSnapshotRequest.

protos.google.pubsub.v1.IGetSubscriptionRequest

Properties of a GetSubscriptionRequest.

protos.google.pubsub.v1.IGetTopicRequest

Properties of a GetTopicRequest.

protos.google.pubsub.v1.IListSchemaRevisionsRequest

Properties of a ListSchemaRevisionsRequest.

protos.google.pubsub.v1.IListSchemaRevisionsResponse

Properties of a ListSchemaRevisionsResponse.

protos.google.pubsub.v1.IListSchemasRequest

Properties of a ListSchemasRequest.

protos.google.pubsub.v1.IListSchemasResponse

Properties of a ListSchemasResponse.

protos.google.pubsub.v1.IListSnapshotsRequest

Properties of a ListSnapshotsRequest.

protos.google.pubsub.v1.IListSnapshotsResponse

Properties of a ListSnapshotsResponse.

protos.google.pubsub.v1.IListSubscriptionsRequest

Properties of a ListSubscriptionsRequest.

protos.google.pubsub.v1.IListSubscriptionsResponse

Properties of a ListSubscriptionsResponse.

protos.google.pubsub.v1.IListTopicSnapshotsRequest

Properties of a ListTopicSnapshotsRequest.

protos.google.pubsub.v1.IListTopicSnapshotsResponse

Properties of a ListTopicSnapshotsResponse.

protos.google.pubsub.v1.IListTopicsRequest

Properties of a ListTopicsRequest.

protos.google.pubsub.v1.IListTopicsResponse

Properties of a ListTopicsResponse.

protos.google.pubsub.v1.IListTopicSubscriptionsRequest

Properties of a ListTopicSubscriptionsRequest.

protos.google.pubsub.v1.IListTopicSubscriptionsResponse

Properties of a ListTopicSubscriptionsResponse.

protos.google.pubsub.v1.IMessageStoragePolicy

Properties of a MessageStoragePolicy.

protos.google.pubsub.v1.IModifyAckDeadlineRequest

Properties of a ModifyAckDeadlineRequest.

protos.google.pubsub.v1.IModifyPushConfigRequest

Properties of a ModifyPushConfigRequest.

protos.google.pubsub.v1.IPublishRequest

Properties of a PublishRequest.

protos.google.pubsub.v1.IPublishResponse

Properties of a PublishResponse.

protos.google.pubsub.v1.IPubsubMessage

Properties of a PubsubMessage.

protos.google.pubsub.v1.IPullRequest

Properties of a PullRequest.

protos.google.pubsub.v1.IPullResponse

Properties of a PullResponse.

protos.google.pubsub.v1.IPushConfig

Properties of a PushConfig.

protos.google.pubsub.v1.IReceivedMessage

Properties of a ReceivedMessage.

protos.google.pubsub.v1.IRetryPolicy

Properties of a RetryPolicy.

protos.google.pubsub.v1.IRollbackSchemaRequest

Properties of a RollbackSchemaRequest.

protos.google.pubsub.v1.ISchema

Properties of a Schema.

protos.google.pubsub.v1.ISchemaSettings

Properties of a SchemaSettings.

protos.google.pubsub.v1.ISeekRequest

Properties of a SeekRequest.

protos.google.pubsub.v1.ISeekResponse

Properties of a SeekResponse.

protos.google.pubsub.v1.ISnapshot

Properties of a Snapshot.

protos.google.pubsub.v1.IStreamingPullRequest

Properties of a StreamingPullRequest.

protos.google.pubsub.v1.IStreamingPullResponse

Properties of a StreamingPullResponse.

protos.google.pubsub.v1.ISubscription

Properties of a Subscription.

protos.google.pubsub.v1.ITopic

Properties of a Topic.

protos.google.pubsub.v1.IUpdateSnapshotRequest

Properties of an UpdateSnapshotRequest.

protos.google.pubsub.v1.IUpdateSubscriptionRequest

Properties of an UpdateSubscriptionRequest.

protos.google.pubsub.v1.IUpdateTopicRequest

Properties of an UpdateTopicRequest.

protos.google.pubsub.v1.IValidateMessageRequest

Properties of a ValidateMessageRequest.

protos.google.pubsub.v1.IValidateMessageResponse

Properties of a ValidateMessageResponse.

protos.google.pubsub.v1.IValidateSchemaRequest

Properties of a ValidateSchemaRequest.

protos.google.pubsub.v1.IValidateSchemaResponse

Properties of a ValidateSchemaResponse.

protos.google.pubsub.v1.PushConfig.INoWrapper

Properties of a NoWrapper.

protos.google.pubsub.v1.PushConfig.IOidcToken

Properties of an OidcToken.

protos.google.pubsub.v1.PushConfig.IPubsubWrapper

Properties of a PubsubWrapper.

protos.google.pubsub.v1.StreamingPullResponse.IAcknowledgeConfirmation

Properties of an AcknowledgeConfirmation.

protos.google.pubsub.v1.StreamingPullResponse.IModifyAckDeadlineConfirmation

Properties of a ModifyAckDeadlineConfirmation.

protos.google.pubsub.v1.StreamingPullResponse.ISubscriptionProperties

Properties of a SubscriptionProperties.

PublishOptions

SchemaMessageMetadata

Schema metadata that might be gathered from a Pub/Sub message. This is created for you from .

SubscriberOptions

{object} SubscriberOptions {number} [ackDeadline=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, subject to the limitations of minAckDeadline and maxAckDeadline. If ackDeadline is set by the user, then the min/max values will be set to match it. New code should prefer setting minAckDeadline and maxAckDeadline directly. {Duration} [minAckDeadline] The minimum time that ackDeadline should ever have, while it's under library control. {Duration} [maxAckDeadline] The maximum time that ackDeadline should ever have, while it's under library control. {BatchOptions} [batching] Request batching options. {FlowControlOptions} [flowControl] Flow control options. {boolean} [useLegacyFlowControl] 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. {MessageStreamOptions} [streamingOptions] Streaming options.

Subscription

Enums

protos.google.api.ClientLibraryDestination

ClientLibraryDestination enum.

protos.google.api.ClientLibraryOrganization

ClientLibraryOrganization enum.

protos.google.api.FieldBehavior

FieldBehavior enum.

protos.google.api.LaunchStage

LaunchStage enum.

protos.google.api.ResourceDescriptor.History

History enum.

protos.google.api.ResourceDescriptor.Style

Style enum.

protos.google.protobuf.ExtensionRangeOptions.VerificationState

VerificationState enum.

protos.google.protobuf.FeatureSet.EnumType

EnumType enum.

protos.google.protobuf.FeatureSet.FieldPresence

FieldPresence enum.

protos.google.protobuf.FeatureSet.JsonFormat

JsonFormat enum.

protos.google.protobuf.FeatureSet.MessageEncoding

MessageEncoding enum.

protos.google.protobuf.FeatureSet.RepeatedFieldEncoding

RepeatedFieldEncoding enum.

protos.google.protobuf.FeatureSet.StringFieldValidation

StringFieldValidation enum.

protos.google.protobuf.FieldDescriptorProto.Label

Label enum.

protos.google.protobuf.FieldDescriptorProto.Type

Type enum.

protos.google.protobuf.FieldOptions.CType

CType enum.

protos.google.protobuf.FieldOptions.JSType

JSType enum.

protos.google.protobuf.FieldOptions.OptionRetention

OptionRetention enum.

protos.google.protobuf.FieldOptions.OptionTargetType

OptionTargetType enum.

protos.google.protobuf.FileOptions.OptimizeMode

OptimizeMode enum.

protos.google.protobuf.GeneratedCodeInfo.Annotation.Semantic

Semantic enum.

protos.google.protobuf.MethodOptions.IdempotencyLevel

IdempotencyLevel enum.

protos.google.pubsub.v1.BigQueryConfig.State

State enum.

protos.google.pubsub.v1.CloudStorageConfig.State

State enum.

protos.google.pubsub.v1.Encoding

Encoding enum.

protos.google.pubsub.v1.Schema.Type

Type enum.

protos.google.pubsub.v1.SchemaView

SchemaView enum.

protos.google.pubsub.v1.Subscription.State

State enum.

Variables

AckResponses

AckResponses: {
    PermissionDenied: "PERMISSION_DENIED";
    FailedPrecondition: "FAILED_PRECONDITION";
    Success: "SUCCESS";
    Invalid: "INVALID";
    Other: "OTHER";
}

Encodings

Encodings: {
    Json: "JSON";
    Binary: "BINARY";
}

SchemaTypes

SchemaTypes: {
    ProtocolBuffer: "PROTOCOL_BUFFER";
    Avro: "AVRO";
}

SchemaViews

SchemaViews: {
    Basic: "BASIC";
    Full: "FULL";
}

Type Aliases

AckResponse

export type AckResponse = ValueOf

Attributes

export type Attributes = Record

Strings are the only allowed values for keys and values in message attributes.

CreateSchemaResponse

export type CreateSchemaResponse = google.pubsub.v1.Schema;

CreateSnapshotCallback

export type CreateSnapshotCallback = ResourceCallback

CreateSnapshotResponse

export type CreateSnapshotResponse = [Snapshot, google.pubsub.v1.ISnapshot];

CreateSubscriptionCallback

export type CreateSubscriptionCallback = SubscriptionCallback;

CreateSubscriptionOptions

export type CreateSubscriptionOptions = SubscriptionMetadata & {
    gaxOpts?: CallOptions;
    flowControl?: FlowControlOptions;
};

CreateSubscriptionResponse

export type CreateSubscriptionResponse = SubscriptionResponse;

CreateTopicCallback

export type CreateTopicCallback = TopicCallback;

CreateTopicResponse

export type CreateTopicResponse = TopicResponse;

EmptyCallback

export type EmptyCallback = RequestCallback

EmptyResponse

export type EmptyResponse = [google.protobuf.IEmpty];

ExistsCallback

export type ExistsCallback = RequestCallback

ExistsResponse

export type ExistsResponse = [boolean];

GetPolicyCallback

export type GetPolicyCallback = RequestCallback

GetPolicyResponse

export type GetPolicyResponse = [Policy];

GetSnapshotsCallback

export type GetSnapshotsCallback = RequestCallback

GetSnapshotsResponse

export type GetSnapshotsResponse = PagedResponse

GetSubscriptionCallback

export type GetSubscriptionCallback = SubscriptionCallback;

GetSubscriptionMetadataCallback

export type GetSubscriptionMetadataCallback = MetadataCallback;

GetSubscriptionMetadataResponse

export type GetSubscriptionMetadataResponse = MetadataResponse;

GetSubscriptionOptions

export type GetSubscriptionOptions = CallOptions & {
    autoCreate?: boolean;
};

GetSubscriptionResponse

export type GetSubscriptionResponse = SubscriptionResponse;

GetSubscriptionsCallback

export type GetSubscriptionsCallback = GetAllSubscriptionsCallback | GetTopicSubscriptionsCallback;

GetSubscriptionsResponse

export type GetSubscriptionsResponse = GetAllSubscriptionsResponse | GetTopicSubscriptionsResponse;

GetTopicCallback

export type GetTopicCallback = TopicCallback;

GetTopicMetadataCallback

export type GetTopicMetadataCallback = MetadataCallback;

GetTopicMetadataResponse

export type GetTopicMetadataResponse = MetadataResponse;

GetTopicOptions

export type GetTopicOptions = CallOptions & {
    autoCreate?: boolean;
};

GetTopicResponse

export type GetTopicResponse = TopicResponse;

GetTopicsCallback

export type GetTopicsCallback = RequestCallback

GetTopicsResponse

export type GetTopicsResponse = PagedResponse

GetTopicSubscriptionsCallback

export type GetTopicSubscriptionsCallback = RequestCallback

GetTopicSubscriptionsResponse

export type GetTopicSubscriptionsResponse = PagedResponse

ICreateSchemaRequest

export type ICreateSchemaRequest = google.pubsub.v1.ICreateSchemaRequest;

ISchema

export type ISchema = google.pubsub.v1.ISchema;

Policy

export type Policy = {
    etag?: string | Buffer;
} & Omit

protos.google.pubsub.v1.Publisher.CreateTopicCallback

type CreateTopicCallback = (error: (Error|null), response?: google.pubsub.v1.Topic) => void;

Callback as used by .

protos.google.pubsub.v1.Publisher.DeleteTopicCallback

type DeleteTopicCallback = (error: (Error|null), response?: google.protobuf.Empty) => void;

Callback as used by .

protos.google.pubsub.v1.Publisher.DetachSubscriptionCallback

type DetachSubscriptionCallback = (error: (Error|null), response?: google.pubsub.v1.DetachSubscriptionResponse) => void;

Callback as used by .

protos.google.pubsub.v1.Publisher.GetTopicCallback

type GetTopicCallback = (error: (Error|null), response?: google.pubsub.v1.Topic) => void;

Callback as used by .

protos.google.pubsub.v1.Publisher.ListTopicsCallback

type ListTopicsCallback = (error: (Error|null), response?: google.pubsub.v1.ListTopicsResponse) => void;

Callback as used by .

protos.google.pubsub.v1.Publisher.ListTopicSnapshotsCallback

type ListTopicSnapshotsCallback = (error: (Error|null), response?: google.pubsub.v1.ListTopicSnapshotsResponse) => void;

Callback as used by .

protos.google.pubsub.v1.Publisher.ListTopicSubscriptionsCallback

type ListTopicSubscriptionsCallback = (error: (Error|null), response?: google.pubsub.v1.ListTopicSubscriptionsResponse) => void;

Callback as used by .

protos.google.pubsub.v1.Publisher.PublishCallback

type PublishCallback = (error: (Error|null), response?: google.pubsub.v1.PublishResponse) => void;

Callback as used by .

protos.google.pubsub.v1.Publisher.UpdateTopicCallback

type UpdateTopicCallback = (error: (Error|null), response?: google.pubsub.v1.Topic) => void;

Callback as used by .

protos.google.pubsub.v1.SchemaService.CommitSchemaCallback

type CommitSchemaCallback = (error: (Error|null), response?: google.pubsub.v1.Schema) => void;

Callback as used by .

protos.google.pubsub.v1.SchemaService.CreateSchemaCallback

type CreateSchemaCallback = (error: (Error|null), response?: google.pubsub.v1.Schema) => void;

Callback as used by .

protos.google.pubsub.v1.SchemaService.DeleteSchemaCallback

type DeleteSchemaCallback = (error: (Error|null), response?: google.protobuf.Empty) => void;

Callback as used by .

protos.google.pubsub.v1.SchemaService.DeleteSchemaRevisionCallback

type DeleteSchemaRevisionCallback = (error: (Error|null), response?: google.pubsub.v1.Schema) => void;

Callback as used by .

protos.google.pubsub.v1.SchemaService.GetSchemaCallback

type GetSchemaCallback = (error: (Error|null), response?: google.pubsub.v1.Schema) => void;

Callback as used by .

protos.google.pubsub.v1.SchemaService.ListSchemaRevisionsCallback

type ListSchemaRevisionsCallback = (error: (Error|null), response?: google.pubsub.v1.ListSchemaRevisionsResponse) => void;

Callback as used by .

protos.google.pubsub.v1.SchemaService.ListSchemasCallback

type ListSchemasCallback = (error: (Error|null), response?: google.pubsub.v1.ListSchemasResponse) => void;

Callback as used by .

protos.google.pubsub.v1.SchemaService.RollbackSchemaCallback

type RollbackSchemaCallback = (error: (Error|null), response?: google.pubsub.v1.Schema) => void;

Callback as used by .

protos.google.pubsub.v1.SchemaService.ValidateMessageCallback

type ValidateMessageCallback = (error: (Error|null), response?: google.pubsub.v1.ValidateMessageResponse) => void;

Callback as used by .

protos.google.pubsub.v1.SchemaService.ValidateSchemaCallback

type ValidateSchemaCallback = (error: (Error|null), response?: google.pubsub.v1.ValidateSchemaResponse) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.AcknowledgeCallback

type AcknowledgeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.CreateSnapshotCallback

type CreateSnapshotCallback = (error: (Error|null), response?: google.pubsub.v1.Snapshot) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.CreateSubscriptionCallback

type CreateSubscriptionCallback = (error: (Error|null), response?: google.pubsub.v1.Subscription) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.DeleteSnapshotCallback

type DeleteSnapshotCallback = (error: (Error|null), response?: google.protobuf.Empty) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.DeleteSubscriptionCallback

type DeleteSubscriptionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.GetSnapshotCallback

type GetSnapshotCallback = (error: (Error|null), response?: google.pubsub.v1.Snapshot) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.GetSubscriptionCallback

type GetSubscriptionCallback = (error: (Error|null), response?: google.pubsub.v1.Subscription) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.ListSnapshotsCallback

type ListSnapshotsCallback = (error: (Error|null), response?: google.pubsub.v1.ListSnapshotsResponse) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.ListSubscriptionsCallback

type ListSubscriptionsCallback = (error: (Error|null), response?: google.pubsub.v1.ListSubscriptionsResponse) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.ModifyAckDeadlineCallback

type ModifyAckDeadlineCallback = (error: (Error|null), response?: google.protobuf.Empty) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.ModifyPushConfigCallback

type ModifyPushConfigCallback = (error: (Error|null), response?: google.protobuf.Empty) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.PullCallback

type PullCallback = (error: (Error|null), response?: google.pubsub.v1.PullResponse) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.SeekCallback

type SeekCallback = (error: (Error|null), response?: google.pubsub.v1.SeekResponse) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.StreamingPullCallback

type StreamingPullCallback = (error: (Error|null), response?: google.pubsub.v1.StreamingPullResponse) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.UpdateSnapshotCallback

type UpdateSnapshotCallback = (error: (Error|null), response?: google.pubsub.v1.Snapshot) => void;

Callback as used by .

protos.google.pubsub.v1.Subscriber.UpdateSubscriptionCallback

type UpdateSubscriptionCallback = (error: (Error|null), response?: google.pubsub.v1.Subscription) => void;

Callback as used by .

PublishCallback

export type PublishCallback = RequestCallback

PushConfig

export type PushConfig = google.pubsub.v1.IPushConfig;

SchemaEncoding

export type SchemaEncoding = keyof typeof google.pubsub.v1.Encoding;

SchemaType

export type SchemaType = keyof typeof google.pubsub.v1.Schema.Type;

SchemaView

export type SchemaView = keyof typeof google.pubsub.v1.SchemaView;

SeekCallback

export type SeekCallback = RequestCallback

SeekResponse

export type SeekResponse = [google.pubsub.v1.ISeekResponse];

SetPolicyCallback

export type SetPolicyCallback = RequestCallback

SetPolicyResponse

export type SetPolicyResponse = [Policy];

SetSubscriptionMetadataCallback

export type SetSubscriptionMetadataCallback = MetadataCallback;

SetSubscriptionMetadataResponse

export type SetSubscriptionMetadataResponse = MetadataResponse;

SetTopicMetadataCallback

export type SetTopicMetadataCallback = MetadataCallback;

SetTopicMetadataResponse

export type SetTopicMetadataResponse = MetadataResponse;

SubscriptionCloseCallback

export type SubscriptionCloseCallback = (err?: Error) => void;

SubscriptionMetadata

export type SubscriptionMetadata = {
    messageRetentionDuration?: google.protobuf.IDuration | number;
    pushEndpoint?: string;
    oidcToken?: OidcToken;
} & Omit

SubscriptionOptions

export type SubscriptionOptions = SubscriberOptions & {
    topic?: Topic;
};

TestIamPermissionsCallback

export type TestIamPermissionsCallback = ResourceCallback

TestIamPermissionsResponse

export type TestIamPermissionsResponse = [
    IamPermissionsMap,
    IamProtos.google.iam.v1.ITestIamPermissionsResponse
];

TopicMetadata

export type TopicMetadata = google.pubsub.v1.ITopic;

TotalOfUnit

export type TotalOfUnit = 'hour' | 'minute' | 'second' | 'millisecond';

Simplified list of values to pass to Duration.totalOf(). This list is taken from the tc39 Temporal.Duration proposal, but larger and smaller units have been left off.