Module subscriber_client (0.1.0)

API documentation for pubsublite.cloudpubsub.subscriber_client module.

Classes

AsyncSubscriberClient

AsyncSubscriberClient(
    nack_handler: Optional[
        google.cloud.pubsublite.cloudpubsub.nack_handler.NackHandler
    ] = None,
    message_transformer: Optional[
        google.cloud.pubsublite.cloudpubsub.message_transformer.MessageTransformer
    ] = None,
    credentials: Optional[google.auth.credentials.Credentials] = None,
    transport: str = "grpc_asyncio",
    client_options: 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: Optional[concurrent.futures.thread.ThreadPoolExecutor] = None,
    nack_handler: Optional[
        google.cloud.pubsublite.cloudpubsub.nack_handler.NackHandler
    ] = None,
    message_transformer: Optional[
        google.cloud.pubsublite.cloudpubsub.message_transformer.MessageTransformer
    ] = None,
    credentials: Optional[google.auth.credentials.Credentials] = None,
    transport: str = "grpc_asyncio",
    client_options: 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.