michaeljmarshall commented on pull request #14185:
URL: https://github.com/apache/pulsar/pull/14185#issuecomment-1068734602


   @lhotari and @merlimat - I realized that the cost of canceling and 
rescheduling a batch message timer for every batch might not be ideal, 
especially in high throughput producers. Therefore, I switched the logic to 
match that of the `sendTimeout`, which essentially reschedules a timeout if an 
insufficient amount of time has passed since an event (in this PR's case, that 
is the time since last sending a message).
   
   I also rand into an issue with the 
`SimpleProducerConsumerStatTest#testSendTimeout`. It exposed the fact that my 
design did not allow for queued batch messages to get timed out when the 
producer is disconnected. I updated the logic with a naive solution. The one 
"surprising" affect of my solution might be that a message might get up to 
double the send timeout if the producer reconnects at the "right" time. I think 
this is fine, but let me know if this tradeoff is a problem.


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