ngoyal16 opened a new issue, #19136:
URL: https://github.com/apache/pulsar/issues/19136

   ### Motivation
   
   We are working on a project which requires msg to be have its own retry in a 
single consumer. like one msg will should be retry one time and other might 
retry 100 times. 
   
   This change will add an additional functionality to the Pulsar which can be 
a good point to consider it over other queuing plateforms like SQS, RabbitMQ 
when it comes with per message retry feature.
   
   We are working on an IoT based application where few msg coming from the 
devices needs to retry 100s of times where other require 3 retry per event. As 
per current design using pulsar we can have retry mechnism at consumer level 
which will process all msg to the same number of re-deliveries even they don't 
have to.
   
   ### Goal
   
   In this PIP scope we will be adding per msg retry mechnims. so that each msg 
can have it's own max retry property defaults to consumer level retry
   
   I have done few research on it and found that consumer client librarires are 
the one which responsible to send the msg to Retry or DLQ topic based on the 
redelivery define in the consumer using `reconsumeLater`. we can implement 
retry per msg code there so that we don't have to add any additional things at 
pulsar broker. 
   
   
   
   
   ### API Changes
   
   _No response_
   
   ### Implementation
   
   As a message should go to RETRY or DLQ topic is decided by the consumer 
based on consumer redelivery parameter. So we can make changes in 
`reconsumeLater` function and check if a msg contains a propoerty called 
`MAX_RECONSUME_TIMES` then use that over consumer redelivery to decide it 
should retry or send to dlq.
   
   I have Created a PR for proposed changes in go client lib: 
https://github.com/apache/pulsar-client-go/pull/939 
   
   ### Alternatives
   
   There is no alternative as of now in the pulsar ifself. but ouside we are 
doing the same like having higher consumer redeliver times and setting property 
`MAX_RECONSUME_TIMES` in a msg and while consuming we are chekcing agaist 
`RECONSUMETIMES`.
   
   Based on condition where `RECONSUMETIMES > MAX_RECONSUME_TIMES` we are 
acking the msg.
   
   ### Anything else?
   
   _No response_


-- 
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: commits-unsubscr...@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to