YutongZh opened a new issue, #6178:
URL: https://github.com/apache/rocketmq/issues/6178

   ** QUESTION**
   
   1. Please describe the issue you observed:
   
   - What did you do (The steps to reproduce)?
   
     My requirement is to pull messages from MQ regularly. 
   
   - What is expected to see?
   
   I hope to see that the message can be pulled by me normally
   
   - What did you see instead?
   
   The strange thing is that I used the subscription mode when I officially 
pulled the news, but I couldn't pull the news, and all I pulled were empty 
collections. There is no problem using push mode. Here is the consumer class 
(org.apache.rocketmq.example.simple.LitePullConsumerSubscribe) from the source 
code that I am using. Hope to get your reply.
   
   2. Please tell us about your environment:
   Version is 4.4.0,The symptoms of the stand-alone cluster are the same
   
   4. Other information (e.g. detailed explanation, logs, related issues, 
suggestions on how to fix, etc):
   ` class LitePullConsumerSubscribe {
   
       public static volatile boolean running = true;
   
       public static void main(String[] args) throws Exception {
           DefaultLitePullConsumer litePullConsumer = new 
DefaultLitePullConsumer("test-consumer");
           
litePullConsumer.setConsumeFromWhere(ConsumeFromWhere.CONSUME_FROM_FIRST_OFFSET);
           litePullConsumer.setNamesrvAddr("11.112.222.124:9876");
           litePullConsumer.subscribe("yyds", "*");
           litePullConsumer.start();
           try {
               while (running) {
                   List<MessageExt> messageExts = litePullConsumer.poll();
                   System.out.printf("%s%n", messageExts);
               }
           } finally {
               litePullConsumer.shutdown();
           }
       }
   }`
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to