You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/07/02 19:35:14 UTC

[GitHub] [pulsar] merlimat commented on issue #4656: C++ client producer sendAsync() timeout check method seems too arbitrary

merlimat commented on issue #4656: C++ client producer sendAsync() timeout check method seems too arbitrary
URL: https://github.com/apache/pulsar/issues/4656#issuecomment-507815638
 
 
   > But then, it invokes the method ProducerImpl::failPendingMessages(...) for dealing the message failure stuff. Definitely, it works, but not only on the message it already checked as we hoped, but just all the messages inside ProducerImpl::pendingMessagesQueue_.
   
   The reason for erroring out all the messages in the queue after the 1st message times out is to give chance to the application to preserve ordering. 
   
   If you're publishing m1, m2 and m3. If m2 times out, a consumer might see m1 followed by m3. By clearing the queue, application can decides to resend m2 & m3 in same order (or just failed both upstream operations). 
   
   Another consideration, is that typically the timeout is set to a value which is order of magnitudes bigger than the normal publish latency (eg: 30sec vs 5millis). This means that when one message times out, it will be very likely that some bigger issue is involved and that most of the messages will anyway hit the timeout threshold.
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services