GitHub user Jaskey opened a pull request: https://github.com/apache/incubator-rocketmq/pull/95
[ROCKETMQ-184]-It takes too long(3-33 seconds) to switch to read from slave when master crashes JIRA:https://issues.apache.org/jira/browse/ROCKETMQ-184?jql=project%20%3D%20ROCKETMQ Problem, no listener is triggered when Chanel is close. When async command sent to the server, and the server is crash before sending response to client, the callback can not be invoked in time. Instead, the callback can only be triggered by the timeout scan service. This is obvious for pulling message since the timeout is by default 30 seconds. So if master crashes before process response to the client, the client can not repull until scan service tell it, which takes at most 30 seconds. And repull will have 3 seconds delay, so the HA to read from slave has to take 3-33 seconds when this problem occurs. You can merge this pull request into a Git repository by running: $ git pull https://github.com/Jaskey/incubator-rocketmq ROCKETMQ-184-slave-switch Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rocketmq/pull/95.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #95 ---- commit 0dc37e1c10450f143e58faa857f5bf8ccbee1ca3 Author: Jaskey <linjunjie1...@gmail.com> Date: 2017-04-19T09:13:09Z invoke callback when channel is close after sending async command ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---