umialpha opened a new issue #8095:
URL: https://github.com/apache/pulsar/issues/8095


   **Is your feature request related to a problem? Please describe.**
   ## Scenarios
   When the consumer gets a message, it selects one of its workers to process. 
It needs to do the following work.
   
   1. It needs to tell Pulsar to **redeliver the message after a timeout.**
   2. If the worker finishes the work within the timeout. It tell Pulsar to 
**Ack the message and do not redeliver the message.**
   3. If the worker fails the work within the timeout, It tells Pulsar to 
**redeliver the message immediately.**
   
   ### First Attempt
   We use Pulsar **AckTimeout** feature. However, It does not meet our 
requirement because if the consumer crashes, the unacked messages will be 
redelivered immediately. What we expect is that the 
messages```NAckedWithDelayedDuration``` only be redelivered after the delayed 
time even if the consumer crashes.
   
   ### Second Attempt
   We use Pulsar ```ReCosume``` logic, but still cannot meet our requirement 
because every time we ReCosume a message, it actually generate a new message, 
when the worker finishes/fails the original message, it has no info about the 
new message.
   
   We could do some workaround here, e.g. when the consumer dispatches the 
original message, it first ReConsume it, generating a new Message, then 
dispatches the new message to the worker. I have done some performance test on 
it, which is really poor.
   
   **Describe the solution you'd like**
   ## Solution
   Just like ```DelayedPublish```, Pulsar could offer ```DelayedNAck```. When 
the message is ```DelayedNAcked```, it won't be available until the delayed 
duration. But it could be ```Acked```, ```NAcked```.
   
   


----------------------------------------------------------------
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.

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


Reply via email to