Allow retry and timeout settings on the Publisher.
timeout= should take google.api_core.timeout.ExponentialTimeout and google.api_core.timeout.ConstantTimeout (also LogicalTimeout in future work).
The goal is be able to set custom retry and custom timeout on the PublisherClient, like this:
custom_retry=api_core.retry.Retry(
initial=0.250, # seconds (default: 0.1)maximum=90.0, # seconds (default: 60.0)multiplier=1.45, # default: 1.3deadline=300.0, # seconds (default: 60.0)predicate=api_core.retry.if_exception_type(
api_core.exceptions.Aborted,
api_core.exceptions.DeadlineExceeded,
api_core.exceptions.InternalServerError,
api_core.exceptions.ResourceExhausted,
api_core.exceptions.ServiceUnavailable,
api_core.exceptions.Unknown,
api_core.exceptions.Cancelled,
),
)
custom_timeout=api_core.timeout.ExponentialTimeout(
initial=1.0, maximum=10.0, multiplier=1.0, deadline=300.0, )
# Something like this:publisher=pubsub_v1.PublisherClient(
publisher_options=pubsub_v1.types.PublisherOptions(
retry=custom_retry,
timeout=custom_timeout,
),
)
Here are the defaults and how they are set currently: https://github.com/googleapis/googleapis/blob/3a935fab757e09c72afd4aa121147a4c97dccc3e/google/pubsub/v1/pubsub_grpc_service_config.json#L42-L62
Remember to update UPGRADING.md as well.
Allow retry and timeout settings on the Publisher.
timeout=should takegoogle.api_core.timeout.ExponentialTimeoutandgoogle.api_core.timeout.ConstantTimeout(alsoLogicalTimeoutin future work).The goal is be able to set custom retry and custom timeout on the PublisherClient, like this:
Here are the defaults and how they are set currently: https://github.com/googleapis/googleapis/blob/3a935fab757e09c72afd4aa121147a4c97dccc3e/google/pubsub/v1/pubsub_grpc_service_config.json#L42-L62
Remember to update
UPGRADING.mdas well.