cimura commented on issue #131: URL: https://github.com/apache/pulsar-client-node/issues/131#issuecomment-720263581
@steelone i succeeded to run you example and reproduce the problem (it was due to not your example but me environment). doesn't it make it work to use `listener` instead of `while` loop? like: ```javascript const consumer = await client.subscribe({ topic, subscription: 'sub1', subscriptionType, listener: (msg, consumer) => { try { consumer.acknowledge(msg); onMessage(msg.getData().toString()); } catch (e) { consumer.close(); onError(e); } } }); ``` ---------------------------------------------------------------- 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