a13707331174 opened a new issue #1726: consumer cant be started if it started 
after another consumer which dont have access to a topic.
URL: https://github.com/apache/rocketmq/issues/1726
 
 
   When acl is enabled, I defined only one topic can be subscribed as the 
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吗

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to