lhotari commented on PR #24596:
URL: https://github.com/apache/pulsar/pull/24596#issuecomment-3151156922

   > This PR involves many changes.
   > 
   > Share the comparison of these two methods from Gemini AI:
   > 
   > > `scheduleAtFixedRate` is best for:
   > > Time-sensitive tasks that need a fixed schedule (e.g., cron jobs, hourly 
chimes).        Tasks where a fixed pause between executions is important, 
especially if task duration is unpredictable.
   > > `scheduleWithFixedDelay` is best for
   > > Tasks where a fixed pause between executions is important, especially if 
task duration is unpredictable.
   > > The choice between scheduleAtFixedRate and scheduleWithFixedDelay 
depends entirely on your specific use case.
   > 
   > Since the issue is exactly with `checkMessageExpiry`, please only change 
its related logic.
   
   @BewareMyPower I think that analysis misses the detail that 
`scheduleWithFixedDelay` will prevent concurrent execution. My suggestion would 
be to continue to use `scheduleAtFixedRate`, but add the solution to 
`Runnables` class to prevent concurrent execution which could cause many 
issues. (explained in my previous comment)


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