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

RocketMQ配置分区,集群模式下多消费实例,只有一个消费实例可以收到消息 #4400

Closed
zhangpf1127 opened this issue Sep 8, 2022 · 2 comments

Comments

@zhangpf1127
Copy link

zhangpf1127 commented Sep 8, 2022

版本

1.1.6

分区配置

canal.mq.dynamicTopic=trade:dy.*\\.trades,trade_his:dy.*\\.trades_his_xdaysago
canal.mq.partitionsNum=32
canal.mq.partitionHash=.*\\..*:tid

tid是表的主键。

问题

阿里RocketMQ,集群模式下多消费实例,只有一个消费实例可以收到消息。
本以为是阿里RocketMQ的问题,提工单让他们技术查的结果是,未收到消息的消费实例分配的队列根本没有接收到消息。

帮忙看看还需要怎么去配置?

@zhangpf1127
Copy link
Author

结贴,给后来的小伙伴。
折腾了好几天的问题,重新梳理了一下wiki上的设置,尝试通过设置canal.mq.enableDynamicQueuePartition来动态获取MQ服务端的分区数,使用阿里RocketMQ的小伙伴,如果有集群模式下只有一个消费实例能够收到消息的问题,可以尝试配置canal.mq.enableDynamicQueuePartition=true 试试。

@zcs19960929
Copy link

结贴,给后来的小伙伴。 折腾了好几天的问题,重新梳理了一下wiki上的设置,尝试通过设置canal.mq.enableDynamicQueuePartition来动态获取MQ服务端的分区数,使用阿里RocketMQ的小伙伴,如果有集群模式下只有一个消费实例能够收到消息的问题,可以尝试配置canal.mq.enableDynamicQueuePartition=true 试试。

感谢,我也是用的阿里RocketMQ.开始1.1.4怎么设置参数都不行,看了你的方法升到1.1.6后设置了这个参数就好了.不过升到1.1.6后启动canal会报错 不支持批处理....还需要改源码

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