You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/08/23 09:18:47 UTC

[GitHub] [rocketmq] lizhanhui commented on issue #4838: send async, time calculation problem

lizhanhui commented on issue #4838:
URL: https://github.com/apache/rocketmq/issues/4838#issuecomment-1223794431

   @15712852007 @lwclover I am the original designer of this scheme. Here are the cons and pros when making the decision.
   1. As a library, when an API promises to developers that it keeps a timeout duration, it should try its best to keep the promise; For example, if developers invoke `send(message, 1s, cb)`, either cb called within 1s or cb is executed with TimeoutException the moment call get expired.
   2. Things get tricky when the internal retry mechanism is involved.  It is too easy to fail the promise now.
   3. After studying solutions of other projects, say [gRPC client retry](https://github.com/grpc/proposal/blob/master/A6-client-retries.md), it is more reasonable to refine the semantics of the timeout in the API as **timeout of the internal RPC** and respect client timeout at the same time. 


-- 
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: dev-unsubscribe@rocketmq.apache.org

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