wolfstudy opened a new issue #11892:
URL: https://github.com/apache/pulsar/issues/11892


   **Is your feature request related to a problem? Please describe.**
   
   At present, ReconsumrLater only supports specifying a specific delay time 
for distribution processing. If we can here follow a certain delay level from 
low to high and allow it to automatically retry, it is a more user-friendly 
way. For example, we can define the following delay level:
   
   ```
   MESSAGE_DELAYLEVEL = "1s 5s 10s 30s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m 20m 30m 
1h 2h"
   ```
   
   Here we can expose two interfaces to the user:
   
   one:
   This implementation method is consistent with the current reconsumeLater 
interface, but instead of specifying the delay level, specify the specific 
delay time. For example, level 1 corresponds to 1s, and level 3 corresponds to 
10s.
   
   ```
   reconsumeLater(msg, 1)
   ```
   
   two: 
   
   Different from the above two, it is a back-off retry, that is, the retry 
interval after the first failure is 1 second, and the retry interval after the 
second failure is 5 seconds, and so on, the more the number of times, the 
longer the interval.
   
   This kind of retry mechanism often has more practical applications in 
business scenarios. If the consumption fails, the general service will not be 
restored immediately. It is more reasonable to use this gradual retry method.
   
   ```
   reconsumeLater(msg)
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to