Module subscriber_client (1.11.1)

API documentation for pubsublite.cloudpubsub.subscriber_client module.

Classes

AsyncSubscriberClient

AsyncSubscriberClient(
    *,
    nack_handler: typing.Optional[
        google.cloud.pubsublite.cloudpubsub.nack_handler.NackHandler
    ] = None,
    reassignment_handler: typing.Optional[
        google.cloud.pubsublite.cloudpubsub.reassignment_handler.ReassignmentHandler
    ] = None,
    message_transformer: typing.Optional[
        google.cloud.pubsublite.cloudpubsub.message_transformer.MessageTransformer
    ] = None,
    credentials: typing.Optional[google.auth.credentials.Credentials] = None,
    transport: str = "grpc_asyncio",
    client_options: typing.Optional[google.api_core.client_options.ClientOptions] = None
)

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

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

SubscriberClient

SubscriberClient(
    *,
    executor: typing.Optional[concurrent.futures.thread.ThreadPoolExecutor] = None,
    nack_handler: typing.Optional[
        google.cloud.pubsublite.cloudpubsub.nack_handler.NackHandler
    ] = None,
    reassignment_handler: typing.Optional[
        google.cloud.pubsublite.cloudpubsub.reassignment_handler.ReassignmentHandler
    ] = None,
    message_transformer: typing.Optional[
        google.cloud.pubsublite.cloudpubsub.message_transformer.MessageTransformer
    ] = None,
    credentials: typing.Optional[google.auth.credentials.Credentials] = None,
    transport: str = "grpc_asyncio",
    client_options: typing.Optional[google.api_core.client_options.ClientOptions] = None
)

A SubscriberClient reads messages similar to Google Pub/Sub. Any subscribe failures are unlikely to succeed if retried.

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