taefed opened a new issue, #359:
URL: https://github.com/apache/pulsar-client-node/issues/359

   I'm trying to consume 1 message at a time, and i'm acknowledging the message 
outside of the listener. But it's just grabbing the next message without 
waiting for the ack.
   
   code sample: 
   ```js
   let msg;
   let msgConsumer;
   
   const consumer = client.subscribe({
                       topic: `persistent://public/default/test1`,
                       subscription: `sub1`,
                       subscriptionType: 'Exclusive',
                       receiverQueueSize:0,
                       ackTimeoutMs:300000,
                       listener: (msg,msgConsumer) => {
                           console.log(msg.getData().toString());
                           msg = msg;
                           msgConsumer = msgConsumer;
   
                       }
                     });
                     
   function someWhereElse(){
   
       msgConsumer.acknowledge(msg);
   
   
   }
   ```
   Is something like this possible?


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