lizhanhui commented on PR #4446: URL: https://github.com/apache/rocketmq/pull/4446#issuecomment-1157195869
@dongeforever > But compatibility is the most important experience for developers. This PR suffers no compatibility issue at all, which has been explicitly stated previously. > it is easy to evolve the RPCHook to get the flow-control ability. This is simply not true. Your proposing alternative suffers in multiple aspects 1. The proposing alternative forces developers to inherit AbstractRpcHook. Considering Java follows single inheritance, it might be a blocking issue for a few cases. 2. Even if AbstractRpcHook is used, users have to set Decision to HandlerContext. Compared to the return-value approach, this API is less intuitive and error-prone. 3. [Context](https://en.wikipedia.org/wiki/Context_(computing)) in most cases are used to feed info to tasks. It is rarely used to return a value, especially when it is not part of the function signature. -- 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]
