GitHub user lizhanhui opened a pull request:
https://github.com/apache/incubator-rocketmq/pull/78
[ROCKETMQ-141]Make producer client connect to new-joined brokers eagerly
When new brokers joins the cluster, MQ producer clients polls name server
and add the new-joined brokers to topicPublishInfo in case the new-joined
broker bears the topic. Later on, the producers may send messages to the
new-joined brokers.
This achieves part of scalable goals and works fine for most cases.
However, we ran an issue in this process. The problem is when new broker joins
the cluster, the producer clients blocks for quite a while even if when
asynchronous send method is employed, which is very miserable for latency
sensitive scenarios.
After analyzing the root cause, it turns out that producer clients need to
establish a connection to the new-joined brokers the first time it sends a
message, as is blocking.
This issue is to establish a connection to new-joined brokers immediately
after polling name server and make them available to send methods thereafter.
Thus, when send is called against new-joined brokers, there is a writable
channel readily available.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/lizhanhui/incubator-rocketmq ROCKETMQ-141
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-rocketmq/pull/78.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 #78
----
commit 51de91c4bddb401eba4fa10e93f85555c75a8997
Author: Zhanhui Li <[email protected]>
Date: 2017-03-13T15:38:18Z
Make producer client connect to new-joined brokers eagerly
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---