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

双主集群 #47

Closed
anzhonghui opened this issue Dec 23, 2022 · 7 comments
Closed

双主集群 #47

anzhonghui opened this issue Dec 23, 2022 · 7 comments

Comments

@anzhonghui
Copy link

请问支持双主集群吗?双主集群只配置一个consumer可以吗?测试发现起两个消费者,分表连接双主的某一个节点,是消费重复的,如何提升单个消费者的消费能力?谢谢

@nnhy
Copy link
Member

nnhy commented Dec 23, 2022

更多主节点的集群都支持,可以在rocketmq控制台上看看集群是否完好。
也可以在每个应用启动日志中看看是否拉取到相同的broker信息。

@anzhonghui
Copy link
Author

非常感谢您的回答,我尝试创建多个相同group的consumer去消费,发现单节点不会重复消费;当我使用双主双从集群模式的时候,两个consumer会出现重复消费的问题,请问是我使用的方式不正确吗

企业微信截图_17fc83cc-2afe-4a52-8719-37c849a2b014
企业微信截图_aeaf9075-5605-4b6f-b97e-5558087fcf68
企业微信截图_dea06d0e-b7a2-40cd-8e95-535e434e8dfd
企业微信截图_9772101c-94e9-40f1-ad8d-8f913395cfd9

@nnhy
Copy link
Member

nnhy commented Dec 23, 2022

两个消费者,分开两个进程试试。如果问题消失,说明我们根据ip@pid的方式来做clientid

@anzhonghui
Copy link
Author

好的,谢谢,我试一下,如果我们只是单机部署,如何提升单个consumer的消费能力?

@nnhy
Copy link
Member

nnhy commented Dec 26, 2022

你的queue分片数,决定了消费线程数。理论上,更多的queue,就得到更多的消费线程,提升吞吐。
实际上绝大部分消费应用,瓶颈都在于消费到消息后的业务逻辑处理。

@anzhonghui
Copy link
Author

好的,谢谢您,不好意思,昨天的问题应该是我没研究明白,可以通过设置customer 的 InstanceName来解决,cliendid:ip@InstanceName

@anzhonghui
Copy link
Author

已解决,谢谢

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

2 participants