开发让开启rocketmq允许Broker自动创建Topic我是在测试环境开启的,生产环境不建议开启此项配置。
1.修改配置文件
[yundiao@nmhs-pt-hd129036 rocketmq-4.8]$ sed -i 's/autoCreateTopicEnable=false/autoCreateTopicEnable=true/g' /data/middleware/rocketmq-4.8/conf/2m-2s-async/broker-s.properties
[yundiao@nmhs-pt-hd129036 rocketmq-4.8]$ sed -i 's/autoCreateTopicEnable=false/autoCreateTopicEnable=true/g' /data/middleware/rocketmq-4.8/conf/2m-2s-async/broker-m.properties
[yundiao@nmhs-pt-hd129036 rocketmq-4.8]$ cd /data/middleware/rocketmq-4.8/bin/
[yundiao@nmhs-pt-hd129036 rocketmq-4.8]$ sh mqadmin updateBrokerConfig -c Cluster-RocketMq -n 10.0.24.110:19876 -k autoCreateTopicEnable -v true
RocketMQLog:WARN No appenders could be found for logger (io.netty.util.internal.PlatformDependent0).
RocketMQLog:WARN Please initialize the logger system properly.
update broker config success, 10.0.24.111:29701
update broker config success, 10.0.24.112:29701
update broker config success, 10.0.24.162:29701
update broker config success, 10.0.24.159:29701
update broker config success, 10.0.24.110:29701
2.通过rocketmq-console检查所有的机器是否已经更新这个属性