Number of broker threads created #3727
-
Docs states that Librdkafka creates 1 main thread and one thread per broker, for each client instance. In the implementation of rd_kafka_new
Is it possible that amount to be reduced to 1 + NUM_BROKERS? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
There's currently no trivial way to reduce the numbers of threads in librdkafka, it would require a large design overhaul. Threads are, however, quite cheap on most systems. What's the problem you are seeing with many threads? |
Beta Was this translation helpful? Give feedback.
-
@edenhill It looks like rdkafka never releases broker threads at runtime. This looks a little stange. |
Beta Was this translation helpful? Give feedback.
-
Even if the server has a node permanently offline, the client still does not release the thread. |
Beta Was this translation helpful? Give feedback.
There's currently no trivial way to reduce the numbers of threads in librdkafka, it would require a large design overhaul.
Threads are, however, quite cheap on most systems. What's the problem you are seeing with many threads?