Skip to content
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

Feature to nack a message for delayed redelivery #169

Closed
itsparser opened this issue Jul 23, 2020 · 5 comments
Closed

Feature to nack a message for delayed redelivery #169

itsparser opened this issue Jul 23, 2020 · 5 comments
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@itsparser
Copy link

itsparser commented Jul 23, 2020

Is your feature request related to a problem? Please describe.

  1. Receive a message
  2. Decide that the message cannot be processed yet
  3. Don't want to block flow control by delaying before nacking
  4. Find yourself frustrated

Describe the solution you'd like
Ref - pub-sub-node.js-255

The suggestion there of adding an optional delay parameter to the nack method.

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/python-pubsub API. label Jul 23, 2020
@plamut plamut added the type: question Request for information or clarification. Not an issue. label Jul 23, 2020
@plamut
Copy link
Contributor

plamut commented Jul 23, 2020

This sounds like retry policy that can be configured when e.g. creating a subscription (docs). Some information can also be found in the product documentation under managing subscriptions.

By default the server tries to re-deliver nack-ed messages as soon as possible, but with a custom retry policy, message re-delivery can be delayed.

Would that help with your use case?

@itsparser
Copy link
Author

@plamut thanks for documents and response , I have gone through this feature already, the problem is Maximum delay between consecutive deliveries of a given message are as following

Value should be between 0 and 600 seconds. Defaults to 600 seconds.

If i like to have custom retry policy with exponential interval or custom interval
i can't do this with pub/sub retry policy - since it capped to 600 secs

let say i have custom interval as following

10min - 1hr - 5hrs - 24hrs - 2days - Dead lettering

Since this interval can't be done thought the above retry

nack a message for delayed redelivery - help to handle both the custom interval and any exponential interval since the control with be with user

@plamut
Copy link
Contributor

plamut commented Jul 24, 2020

If I understand correctly, you would like to have an option to configure custom re-delivery intervals? I'll check if that can be (or is planned to be) supported on the backend. One thing to note is that there might be architectural limits on what the maximum possible/feasible re-delivery delay is.

@kamalaboulhosn Could you provide more insight into what the backend supports? Is it currently even possible to configure custom re-delivery patterns such as the one mentioned above?

10min - 1hr - 5hrs - 24hrs - 2days - Dead lettering

@plamut plamut added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed type: question Request for information or clarification. Not an issue. labels Jul 24, 2020
@pradn
Copy link
Contributor

pradn commented Aug 12, 2020

We don't currently support the sequence you want above.

You can combine a RetryPolicy with a DeadLetterPolicy. You'd get exponential backoff from RetryPolicy, and after some set number of failures, the message would be dead-lettered. Note that both features are best-effort, but generally work pretty well.

The longest backoff duration that you can specify is 600 seconds. So, that's one reason why we can't support the sequence you mention. The other is that RetryPolicy only lets you set an exponential backoff policy with your chosen min/max timeouts. (No custom sequence support exists.)

@hongalex
Copy link
Member

Closing this issue based on the suggestion that @pradn suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants