4 ms·
However it currently lacks the ability to listen for messages and run an event handler when one comes in: https://github.com/apache/pulsar-client-node/pull/56 h
by c0brac0bra 7y ago
However it currently lacks the ability to listen for messages and run an event handler when one comes in: https://github.com/apache/pulsar-client-node/pull/56 https://github.com/apache/pulsar-client-node/pull/56
You have to manually call ".receive()" to attempt to receive a message.
- gperinazzo 7y agoUsing `.receive()` will occupy a worker thread from node until it returns. Having multiple consumers waiting on receive will clog up the worker threadpool, preventing anything that uses it from running. If you want to use the consumer right now, I would suggest always using a timeout on the receive call, and waiting between timed-out calls to receive. This is extremely important if you have multiple consumers.