consumer cant be started if it started after another consumer which dont have access to a topic.
When acl is enabled, I defined only one topic can be subscribed as follow :
globalWhiteRemoteAddresses:
accounts:
- accessKey: accessId123
secretKey: accessKey123
whiteRemoteAddress:
admin: false
defaultTopicPerm: DENY
defaultGroupPerm: SUB
topicPerms:
- TopicA=SUB
groupPerms:
Then I defined two consumers named ConsumerA that subscribed TopicA and ConsumerB that subscribed TopicB. Obviously ConsumerB dont have access to subscribe TopicB. if I started ConsumerA before ConsumerB :
//will subscribe TopicA
Consumer consumerA = new ConsumerA();
//will subscribe TopicB
Consumer consumerB = new ConsumerB();
consumerA.start();
consumerB.start();
Though there would be an AclException in the remoting.log that shows no default permission for topicB, consumerA could start successfully. However if I started ConsumerB before ConsumerA:
//will subscribe TopicA
Consumer consumerA = new ConsumerA();
//will subscribe TopicB
Consumer consumerB = new ConsumerB();
//consumerB starts first
consumerB.start();
consumerA.start();
There also would be an AclExcpetion in the remoting.log that shows no default permission for topicB, consumerA can not be started either. Even though I can see the linux connect was established by command netstat, consumer was offline and can not consume any message. Is this a bug?
如果我只在 plain_acl.yml中只定义了TopicA的订阅权限, 然后我封装了两个消费者类,ConsumerA和ConsumerB,他们分别订阅TopicA和TopicB. 很明显ConsumerB将无权订阅TopicB. 当我先启动ConsumerA,后启动ConsumerB时, ConsumerA启动正常,并可以消费消息. 但是如果我先启动ConsumerB,后启动ConsumerA, 那么不仅ConsumerB无法消费消息,ConsumerA也没法消费消息, 并且这时候,如果我用netstat看的话,ConsumerA是有连接建立的, 但是我通过mqadmin的consumeProgress命令,显示的是消费者处于OffLine状态, 通过rocketmq-console也看不到消费者在线. 这是个bug吗
The version i used is 4.6.0
Okay, I will see this issue these days.
@zhangjidi2016
This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.
This issue was closed because it has been inactive for 3 days since being marked as stale.