Reputation: 391
I have a Cloud Run service that subscribes to a PubSub topic using HTTP Push.
When my service returns HTTP 400, PubSub keeps trying forever. How can I decrease the delivery attempts and add a time between each attempt?
Upvotes: 0
Views: 150
Reputation: 75930
On your PubSub subscription, you can use 2 features:
Dead letter topic, after a number of tries (mini 5 tries), ack the message publish it in another topic. Like that, after a certain number of tries, the message is no longer pushed to your app.
You can choose to listen, or not, the dead letter topic. By default, if there isn't subscription on the dead letter topic, the messages are deleted.
The retry policy add exponential backoff between each tries.
Upvotes: 2