修改conf文件夹下的broker.conf
在broker.conf配置中增加这个配置
brokerIP1
=[你的IP
]
autoCreateTopicEnable
=true
重新启动broker
把原先的启动命令换成
sh /bin/mqbroker -n 192.168.1.100:9876 -c
../conf/broker.conf
也可以用
sh /bin/mqbroker -n 192.168.1.100:9876 autoCreateTopicEnable
=true -c
../conf/broker.conf
因broker.conf 中已经增加了autoCreateTopicEnable=true的配置,默认下会自动创建topic