RocketMQMessageListener nameServer not work
- Please describe the issue you observed:
I have a webapp, there are two consumers which connect to two rocketmq clusters. Each of the consumer have different nameserver, topics and consumer group names. As belows: `@RocketMQMessageListener( nameServer = "${uat.rocketmq.nameServer}", topic = "uat-topic", consumerGroup = "demo-consumer-group-uat")
@RocketMQMessageListener( nameServer = "${dev.rocketmq.nameServer}", topic = "dev-topic", consumerGroup = "demo-consumer-group-dev")`
I have a global config:
rocketmq.name-server=10.2.3.4:9876
The consumers will always subscribe to the global configed nameserver.
This issue is not the same with https://github.com/apache/rocketmq-spring/issues/254 But I have a workaround by setting the instanceName of consumers.
It is indeed a bug. If we do not set different instanceName for consumer in same process, the same MQClientInstance will be used by the consumer, causing the nameserver address to be overwritten. If you have any workaround, it is welcomed to submit a pull request to solve it.
Has anyone fixed this bug? @RongtongJin
Has anyone fixed this bug? @RongtongJin
Not yet, PR is welcomed to fix this issue.
Can you help to fix this issue and put forward a pr? @zhangjidi2016
OK,this issue can assign to me.
It's yours.And this issue may be difficult to reproducer in test enviroment, you can ask @RongtongJin for some of its details. @zhangjidi2016
Fix it.