Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

消费者负载均衡功能调整 #17

Closed
tangxuehua opened this issue Jan 15, 2016 · 0 comments
Closed

消费者负载均衡功能调整 #17

tangxuehua opened this issue Jan 15, 2016 · 0 comments

Comments

@tangxuehua
Copy link
Owner

目前,当消费者与Broker一断开,就会立即将其从消费者列表中移除,从而导致新一轮的负载均衡时,同一个队列会被分配到另一个消费者;但有时消费者与Broker之间只是闪断,很快又会自动连上的。所以不应该因为这种闪断而改变queue对应的消费者。

所以,为了让queue和consumer之间的对应关系可以更稳定不变(除非真的增加或减少consumer服务器),去掉这个逻辑,然后只通过心跳来判断消费者是否已断开。心跳机制因为有时间方面的考虑,并不是一断开就立即认为该消费者已挂掉;而是通过判断当多少时间都没有收到consumer的心跳,才认为该consumer已断开。这个时间我们开发者可以自己配置。

tangxuehua added a commit that referenced this issue Apr 10, 2016
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

No branches or pull requests

1 participant