edit-icon download-icon

How to retry after a failed attempt to consume an message?

Last Updated: Feb 24, 2018

Clustering consumption

If the consumption business logic code returns Action.ReconsumerLater or NULL, or throws an exception, then it retries up to 16 times. If it still fails after 16 attempts, then the message is discarded. Intervals between each retry are as follows:

Retried Times Retry Interval
1 10 seconds
2 30 seconds
3 1 minute
4 2 minutes
5 3 minutes
6 4 minutes
7 5 minutes
8 6 minutes
9 7 minutes
10 8 minutes
11 9 minutes
12 10 minutes
13 20 minutes
14 30 minutes
15 1 hour
16 2 hours

A message’s retried times can be retrieved by calling message.getReconsumeTimes().

Broadcasting consumption

For broadcasting consumption, a message is consumed at least once, without retrying after a failed attempt to consume.

Thank you! We've received your feedback.