4 ms·
"high-level APIs for Java, C++, Python and GO", no love for Node.js? :(
by js4ever 7y ago
"high-level APIs for Java, C++, Python and GO", no love for Node.js? :(
- tyingq 7y agoIt exists: https://pulsar.apache.org/docs/en/next/client-libraries-node/ https://pulsar.apache.org/docs/en/next/client-libraries-node...
- c0brac0bra 7y agoHowever 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.
- maxtollenaar 7y agoYou can also use the websocket proxy: https://pulsar.apache.org/docs/en/next/client-libraries-websocket/ https://pulsar.apache.org/docs/en/next/client-libraries-webs...