Module publisher_client (1.10.0)

API documentation for pubsublite.cloudpubsub.publisher_client module.

Classes

AsyncPublisherClient

AsyncPublisherClient(
    *,
    per_partition_batching_settings: typing.Optional[
        google.cloud.pubsub_v1.types.BatchSettings
    ] = None,
    credentials: typing.Optional[google.auth.credentials.Credentials] = None,
    transport: str = "grpc_asyncio",
    client_options: typing.Optional[
        google.api_core.client_options.ClientOptions
    ] = None,
    enable_idempotence: bool = False
)

An AsyncPublisherClient publishes messages similar to Google Pub/Sub, but must be used in an async context. Any publish failures are unlikely to succeed if retried.

Must be used in an async with block or have aenter() awaited before use.

PublisherClient

PublisherClient(
    *,
    per_partition_batching_settings: typing.Optional[
        google.cloud.pubsub_v1.types.BatchSettings
    ] = None,
    credentials: typing.Optional[google.auth.credentials.Credentials] = None,
    transport: str = "grpc_asyncio",
    client_options: typing.Optional[
        google.api_core.client_options.ClientOptions
    ] = None,
    enable_idempotence: bool = False
)

A PublisherClient publishes messages similar to Google Pub/Sub. Any publish failures are unlikely to succeed if retried.

Must be used in a with block or have enter() called before use.