oneby-wang commented on issue #25028:
URL: https://github.com/apache/pulsar/issues/25028#issuecomment-3607055825

   Hi, @YanshuoH, based on @lhotari and @Denovo1998 suggestions, I would like 
to recommend you to use `MessageRoutingMode.CustomPartition` and define your 
custom routing logic in producer. In this way, you don't have to change your 
producer and consumer logic.
   
   First, your delayed topic must be a partitioned-topic, assume it has 60 
partitions(let's call it n), so you can seperate your delay time range to 1 
minute(let's call it t), each partition will have at most 1min ack holes(the 
large ack holes problem is solved).
   
   Second, define your custom routing logic. You can route 0~1min messages to 
partition-0, route 1~2min messages to partition-1, ......, route 59min~60min 
messages to partition-59.
   
   You can tune n and t to custom your routing logic without modifying producer 
and consumer logic.


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