Could Producer.produce() be blocking NodeJS thread?
See original GitHub issueHi,
While doing some fail tests, I’ve discovered that when I use this library and it can’t connect a broker during application startup (i.e. the first connect - we supply multiple brokers via options), the Producer.produce()
method will work the first time and then, upon subsequent call to the same method, NodeJS thread will hang until error about all brokers being offline is emitted.
Is this something that’s related to node-rdkafka, or could this actually be librdkafka behaving this way?
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:7
Top Results From Across the Web
Don't Block the Event Loop (or the Worker Pool) - Node.js
Node. js has two types of threads: one Event Loop and k Workers. The Event Loop is responsible for JavaScript callbacks and non-blocking...
Read more >When is Node.js blocking? - Stack Overflow
So the I/O tasks are non-blocking because of asynchronous callbacks, but the single thread can be blocking, because it's synchronous and because ...
Read more >Learning Kafka - Writing a Kafka Producer in Node.js - Blog
It is important to note that each producer.flush() call blocks up one libuv thread each. If there are 4 libuv threads and 8...
Read more >Understanding Non-Blocking I/O in JavaScript | Codementor
When a thread invokes a read() or write() operation, that thread is blocked until there is some data to read, or the data...
Read more >Producer-Consumer solution using threads in Java
Object of a class that has both produce() ... Inside this loop, we have a synchronized block so that only a producer or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Awesome. I’ll include the read-write locks in the next release.
seems to work fine now, I’m getting info about brokers being offline without anything being blocked, thumbs up and thank you!