rocketmq-helm icon indicating copy to clipboard operation
rocketmq-helm copied to clipboard

In controller mode, the transaction topic created will be lost after a master-slave switch of the Broker

Open dingsongjie opened this issue 4 months ago • 6 comments

Version : 5.3.3

In controller mode, a transaction topic will be lost after a master-slave switch of the Broker. Through testing, I found that a topic created using mqadmin is only stored in the topics.json file on the master node and is not synchronized to the slave node. After a master-slave switch, the former slave becomes the new master, but the previously created topic is missing. I'm wondering if there's a misconfiguration on my side?

dingsongjie avatar Aug 27 '25 01:08 dingsongjie

I also encountered the same problem, have you found a solution?

tianping526 avatar Oct 13 '25 09:10 tianping526

I also encountered the same problem, have you found a solution?

I can now only avoid using controller mode.

dingsongjie avatar Nov 03 '25 02:11 dingsongjie

you should discuss this problem in https://github.com/apache/rocketmq ,this is not the right place

john1337 avatar Nov 04 '25 05:11 john1337

I also encountered the same problem, have you found a solution?

I can now only avoid using controller mode.

That's how I'm handling it at the moment

tianping526 avatar Nov 04 '25 06:11 tianping526

you should discuss this problem in https://github.com/apache/rocketmq ,this is not the right place

you're right, but there's no official handling of the issue in question, I don't know if it's a bug or if the configuration isn't set correctly somewhere

tianping526 avatar Nov 04 '25 06:11 tianping526

I deployed version 5.3.3 of RocketMQ locally using the binary method, with 1 controller, 1 namesrv, and 1 master + 1 slave broker. After I killed the master, the topics.json file remained intact and message production/consumption continued to succeed. Since version 5.3.3 has deprecated ACL 1.0 and fully adopted ACL 2.0, I would like to know if this Helm chart is compatible with RocketMQ 5.3.3?

fitme96 avatar Nov 12 '25 10:11 fitme96

@fitme96 you didn't get it,the problem [@dingsongjie meets is when broker is changing from broker to master,the new elected master broker didn't have valid topics.json file,so it will report topic not found problems

john1337 avatar Nov 20 '25 06:11 john1337

@dingsongjie @tianping526 如果不使用controller的话那怎么达到master/slave自动切换的功能呢

john1337 avatar Nov 20 '25 07:11 john1337

@fitme96 you didn't get it,the problem [@dingsongjie meets is when broker is changing from broker to master,the new elected master broker didn't have valid topics.json file,so it will report topic not found problems

He seems to say that topics.json is complete

tianping526 avatar Nov 20 '25 07:11 tianping526

@dingsongjie @tianping526 如果不使用controller的话那怎么达到master/slave自动切换的功能呢

暂时没时间处理这个问题,等有空了再研究。如果 @fitme96 说的是对的,可以试试使用ACL 1.0 没有被移除的版本,看会不会复现,或者看看helm chart里面关于ACL的配置

tianping526 avatar Nov 20 '25 07:11 tianping526

这个helm部署aclConfigMapEnabled默认是关闭的,也就是说根本就没启用ACL, @tianping526

另外dingsongjie的原话是: Through testing, I found that a topic created using mqadmin is only stored in the topics.json file on the master node and is not synchronized to the slave node. After a master-slave switch, the former slave becomes the new master, but the previously created topic is missing 即创建topic仅仅保存到了master节点,slave节点没有对应topics.json文件,主从切换后现在的master节点(原来的slave节点)没有topics.json文件

john1337 avatar Nov 20 '25 11:11 john1337

我的问题跟他的一样,也是slave节点没有对应topics.json文件,我看了源码broker在创建topic时确实只保存到了自身的topics.json文件 ,rocketmq官网也没找到有用的东西 @tianping526

john1337 avatar Nov 20 '25 11:11 john1337

这是rocketmq 5.3.2,5.3.3版本的bug,具体可以参考https://github.com/apache/rocketmq/issues/9499

john1337 avatar Nov 21 '25 00:11 john1337

我的问题跟他的一样,也是slave节点没有对应topics.json文件,我看了源码broker在创建topic时确实只保存到了自身的topics.json文件 ,rocketmq官网也没找到有用的东西 @tianping526

这个我之前也复现了,我知道是slave没有同步topics.json,但是不知道为什么没同步。我也感觉官方几乎不怎么管,所以都不想去官方提issue了

tianping526 avatar Nov 21 '25 01:11 tianping526

这是rocketmq 5.3.2,5.3.3版本的bug,具体可以参考apache/rocketmq#9499

哇,牛的兄弟

tianping526 avatar Nov 21 '25 01:11 tianping526