-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pubsub: retry settings #7040
pubsub: retry settings #7040
Comments
Apologies as this seemed to have fallen under the radar. Could you describe the use case for wanting custom retry settings for Publish? You are able to specify a custom Publish retryer by using config := &ClientConfig{
PublisherCallOptions: &vkit.PublisherCallOptions{
Publish: []gax.CallOption{
gax.WithRetry(func() gax.Retryer {
return gax.OnCodes([]codes.Code{
codes.Aborted,
codes.Canceled,
codes.Internal,
codes.ResourceExhausted,
codes.Unknown,
codes.Unavailable,
codes.DeadlineExceeded,
}, gax.Backoff{
Initial: 100 * time.Millisecond,
Max: 60000 * time.Millisecond,
Multiplier: 1.30,
})
}),
},
},
}
client, err := NewClientWithConfig(ctx, projID, config, opts...)``` |
If it's already possible then great. But the documentation should be updated to include a go example. |
Sure, I'll use this issue around as a docs request to add this sample to our docs. |
Apologies, I believe my last example is incorrect as of #5728 since we started using a custom retrier at the Publish level which overrides the retrier defined at the client construction level. I'll track this as a bug for now since I need to discuss with other client lib owners whether or not we want to collectively support custom retries. Edit: disregard the above. The custom retrier does use the retrier defined at client instantiation when the custom path is not met (specific |
Is your feature request related to a problem? Please describe.
I'd like to have better control over the retry policies for my pubsub messages. I found this documentation:
https://cloud.google.com/pubsub/docs/publisher#retry
However it's notably lacking an example for Go and I was unable to find anything similar in the source code of your Go library. The documentation even notes:
It seems Go is one of those that don't have this feature?
Describe the solution you'd like
Retry settings should be implemented in the pubsub library for Go and code sample should be available in the documentation.
Describe alternatives you've considered
No alternative seems to be available for Go.
Additional context
Screenshot from documentation:
The text was updated successfully, but these errors were encountered: