Skip to content

[ROCKETMQ-141]Make producer client connect to new-joined brokers eagerly#78

Closed
lizhanhui wants to merge 1 commit intoapache:developfrom
lizhanhui:ROCKETMQ-141
Closed

[ROCKETMQ-141]Make producer client connect to new-joined brokers eagerly#78
lizhanhui wants to merge 1 commit intoapache:developfrom
lizhanhui:ROCKETMQ-141

Conversation

@lizhanhui
Copy link
Contributor

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.

@coveralls
Copy link

coveralls commented Mar 13, 2017

Coverage Status

Coverage decreased (-0.01%) to 30.994% when pulling 51de91c on lizhanhui:ROCKETMQ-141 into d7decc8 on apache:develop.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 30.994% when pulling 51de91c on lizhanhui:ROCKETMQ-141 into d7decc8 on apache:develop.

@lizhanhui
Copy link
Contributor Author

Guys, any idea on this PR?

@vongosling
Copy link
Member

@lizhanhui I will close the pr, if you happened to the same question, please let me know.

@vongosling vongosling closed this Jul 14, 2018
lizhanhui pushed a commit to lizhanhui/rocketmq that referenced this pull request Jun 25, 2019
pingww pushed a commit that referenced this pull request Aug 26, 2022
* Fix the bug of Get Start in Readme

* Tips for optimizing broker configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants