kimula commented on issue #359:
URL: 
https://github.com/apache/pulsar-client-node/issues/359#issuecomment-1869207309

   Since `listener` is used for asynchronous message processing, it doesn't 
seem to meet your requirement (1 message at a time).
   
   - Why are you using `listener`?
   - Could you try `receive()` instead? e.g.
   
   ```js
   const consumer = client.subscribe( /* without listener */ );
   
   async function somewhereElse() {
     const msg = await consumer.receive();
     consumer.acknowledge(msg);
   }
   ```


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