tclxxiyang-feng opened a new issue, #1343:
URL: https://github.com/apache/rocketmq-clients/issues/1343

   ### Programming Language of the Client
   
   Node.js
   
   ### Is Your Feature Request Related to a Problem?
   
   I want to use Node.js to implement the process of actively pulling messages 
from a specific LiteTopic.
   
   ### Describe the Solution You'd Like
   
   **As shown in the following Java implementation:**
   
   LiteSimpleConsumer consumer = provider.newLiteSimpleConsumerBuilder()
       .setClientConfiguration(clientConfiguration)
       .setConsumerGroup("GID_ai_session_worker_group")
       .bindTopic("ai_session_events_topic")
       .setAwaitDuration(Duration.ofSeconds(20))
       .build();
   
   consumer.subscribeLite("session_8f29a17c");//设置liteTopic,支持动态新增、移除liteTopic
   
   while (running.get()) {
       List<MessageView> messages = consumer.receive(
           16,
           Duration.ofSeconds(60));
   
       for (MessageView message : messages) {
           try {
               handleIdempotently(message);
               consumer.ack(message);
           } catch (RetryableBusinessException e) {
               log.warn("Leave message unacked for retry, messageId={}",
                   message.getMessageId(), e);
           }
       }
   }
   
   
   ### Describe Alternatives You've Considered
   
   Implement using Java
   
   ### Additional Context
   
   _No response_


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