Contains all the Cloud Pub/Sub C++ client types and functions.
Classes
AckHandler
Defines the interface to acknowledge and reject messages.
BigQueryConfigBuilder
A helper class to build google::pubsub::v1::BigQueryConfig
protos.
BlockingPublisher
Publish messages to the Cloud Pub/Sub service.
BlockingPublisherConnection
A connection to the Cloud Pub/Sub service to publish events.
CloudStorageConfigBuilder
A helper class to build google::pubsub::v1::CloudStorageConfig
protos.
ExactlyOnceAckHandler
Defines the interface to acknowledge and reject messages.
LimitedErrorCountRetryPolicy
A retry policy based on counting errors.
LimitedTimeRetryPolicy
A retry policy based on elapsed time.
Message
The C++ representation for a Cloud Pub/Sub messages.
MessageBuilder
Constructs Message
objects.
Publisher
Publish messages to the Cloud Pub/Sub service.
PublisherConnection
A connection to the Cloud Pub/Sub service to publish events.
PublisherOptions
Configuration options for a Publisher
.
PullAckHandler
Defines the interface to acknowledge and reject messages.
PushConfigBuilder
Helper class to create google::pubsub::v1::PushConfig protos.
RetryPolicy
The base class for the Pub/Sub library retry policies.
Schema
Objects of this class identify a Cloud Pub/Sub schema.
SchemaServiceClient
Service for doing schema-related operations.
SchemaServiceConnection
The SchemaServiceConnection
object for SchemaServiceClient
.
SchemaServiceConnectionIdempotencyPolicy
SchemaServiceLimitedErrorCountRetryPolicy
A retry policy for SchemaServiceConnection
based on counting errors.
SchemaServiceLimitedTimeRetryPolicy
A retry policy for SchemaServiceConnection
based on elapsed time.
SchemaServiceRetryPolicy
The retry policy for SchemaServiceConnection
.
Snapshot
Objects of this class identify a Cloud Pub/Sub snapshot.
SnapshotBuilder
Build a request to create a Cloud Pub/Sub snapshot.
Subscriber
Receive messages from the Cloud Pub/Sub service.
SubscriberConnection
A connection to the Cloud Pub/Sub service to receive events.
SubscriberOptions
Configure how a Subscriber
handles incoming messages.
Subscription
Objects of this class identify a Cloud Pub/Sub subscription.
SubscriptionAdminClient
Performs subscription administrative operations in Cloud Pub/Sub.
SubscriptionAdminConnection
A connection to Cloud Pub/Sub for subscription-related administrative operations.
SubscriptionBuilder
Create a Cloud Pub/Sub subscription configuration.
Topic
Objects of this class identify a Cloud Pub/Sub topic.
TopicAdminClient
Performs topic admin operations in Cloud Pub/Sub.
TopicAdminConnection
A connection to Cloud Pub/Sub for topic-related administrative operations.
TopicBuilder
Builds requests to create or update a Cloud Pub/Sub topic.
Structs
BackoffPolicyOption
The backoff policy.
CompressionAlgorithmOption
Compression algorithm.
CompressionThresholdOption
Compression threshold.
ConnectionOptionsTraits
The Cloud Pub/Sub connection traits.
FullPublisherActionOption
The action taken by a full publisher.
MaxBatchBytesOption
The maximum size for the messages in a batch.
MaxBatchMessagesOption
The maximum number of messages in a batch.
MaxConcurrencyOption
The maximum callback concurrency.
MaxDeadlineExtensionOption
The maximum time by which the deadline for each incoming message is extended.
MaxDeadlineTimeOption
The maximum deadline for each incoming message.
MaxHoldTimeOption
The maximum hold time for the messages.
MaxOtelLinkCountOption
The maximum number of Open Telemetry span links.
MaxOutstandingBytesOption
The maximum number of outstanding bytes per streaming pull.
MaxOutstandingMessagesOption
The maximum number of outstanding messages per streaming pull.
MaxPendingBytesOption
The maximum size for pending messages.
MaxPendingMessagesOption
The maximum number of pending messages.
MessageOrderingOption
Publisher message ordering.
MinDeadlineExtensionOption
The minimum time by which the deadline for each incoming message is extended.
PullResponse
The response for a blocking pull.
RetryPolicyOption
The retry policy.
SchemaServiceBackoffPolicyOption
Use with google::cloud::Options
to configure the backoff policy.
SchemaServiceConnectionIdempotencyPolicyOption
Use with google::cloud::Options
to configure which operations are retried.
SchemaServiceRetryPolicyOption
Use with google::cloud::Options
to configure the retry policy.
ShutdownPollingPeriodOption
How often the session polls for automatic shutdowns.
SubscriptionOption
Override the default subscription for a request.
Enums
FullPublisherAction
Actions taken by a full publisher.
Functions
MakeBlockingPublisherConnection(Options)
Creates a new BlockingPublisherConnection
object to work with BlockingPublisher
.
The BlockingPublisherConnection
class is provided for applications wanting to mock the BlockingPublisher
behavior in their tests. It is not intended for direct use.
Performance
Creating a new BlockingPublisherConnection
is relatively expensive. This typically initiates connections to the service, and therefore these objects should be shared and reused when possible. Note that gRPC reuses existing OS resources (sockets) whenever possible, so applications may experience better performance on the second (and subsequent) calls to this function with the same Options
from GrpcOptionList
and CommonOptionList
. However, this behavior is not guaranteed and applications should not rely on it.
See Also
Parameter | |
---|---|
Name | Description |
opts |
The options to use for this call. Expected options are any of the types in the following option lists. |
Returns | |
---|---|
Type | Description |
std::shared_ptr< BlockingPublisherConnection > |
MakePublisherConnection(Topic, std::initializer_list< internal::NonConstructible >)
Creates a new PublisherConnection
object to work with Publisher
.
Parameters | |
---|---|
Name | Description |
topic |
|
|
|
Returns | |
---|---|
Type | Description |
std::shared_ptr< PublisherConnection > |
MakePublisherConnection(Topic, Options)
Creates a new PublisherConnection
object to work with Publisher
.
The PublisherConnection
class is provided for applications wanting to mock the Publisher
behavior in their tests. It is not intended for direct use.
Performance
Creating a new PublisherConnection
is relatively expensive. This typically initiates connections to the service, and therefore these objects should be shared and reused when possible. Note that gRPC reuses existing OS resources (sockets) whenever possible, so applications may experience better performance on the second (and subsequent) calls to this function with the same Options
from GrpcOptionList
and CommonOptionList
. However, this behavior is not guaranteed and applications should not rely on it.
See Also
Parameters | |
---|---|
Name | Description |
topic |
the Cloud Pub/Sub topic used by the returned |
opts |
The options to use for this call. Expected options are any of the types in the following option lists. |
Returns | |
---|---|
Type | Description |
std::shared_ptr< PublisherConnection > |
MakePublisherConnection(Topic, PublisherOptions, ConnectionOptions, std::unique_ptr< RetryPolicy const >, std::unique_ptr< BackoffPolicy const >)
Creates a new PublisherConnection
object to work with Publisher
.
The PublisherConnection
class is not intended for direct use in applications, it is provided for applications wanting to mock the Publisher
behavior in their tests.
Performance
Creating a new PublisherConnection
is relatively expensive. This typically initiate connections to the service, and therefore these objects should be shared and reused when possible. Note that gRPC reuses existing OS resources (sockets) whenever possible, so applications may experience better performance on the second (and subsequent) calls to this function with the identical values for options
. However, this behavior is not guaranteed and applications should not rely on it.
See Also
Parameters | |
---|---|
Name | Description |
topic |
the Cloud Pub/Sub topic used by the returned |
options |
configure the batching policy and other parameters in the returned connection. |
connection_options |
(optional) general configuration for this connection, this type is also used to configure |
retry_policy |
(optional) configure the retry loop. |
backoff_policy |
(optional) configure the backoff period between retries. |
Returns | |
---|---|
Type | Description |
std::shared_ptr< PublisherConnection > |
MakeSchemaServiceConnection(Options)
A factory function to construct an object of type SchemaServiceConnection
.
The returned connection object should not be used directly; instead it should be passed as an argument to the constructor of SchemaServiceClient.
The optional options
argument may be used to configure aspects of the returned SchemaServiceConnection
. Expected options are any of the types in the following option lists:
Parameter | |
---|---|
Name | Description |
options |
(optional) Configure the |
Returns | |
---|---|