kafka-python icon indicating copy to clipboard operation
kafka-python copied to clipboard

Why does producer asks for describing every topic in cluster?

Open Pyrrha opened this issue 4 years ago • 4 comments

Hello,

I received a lot of logs, where I see that kafka-python try to describe every topic of the cluster, with Denied result. I don't know where this list come from, and why the package use it and ask for a describe.

Do you know where I can disable the "auto-discovery" feature of the package? It's on kafka-python==1.4.6. The documentation doesn't seem to indicate something about it.

Thanks!

Pyrrha avatar Jun 28 '21 15:06 Pyrrha

Hi ,

We have the same issue ... @Pyrrha , have you found a solution for this problem ?

Thank you

lquastana avatar Jul 19 '21 13:07 lquastana

We find a solution , if you set bootstrap_topics_filter parameter with the topics needed, the producer will only call the describes on the specified topics. For the consumer its a little bit tricky because the argument is not accepted by the constructor ....

lquastana avatar Jul 19 '21 17:07 lquastana

Hello @lquastana, this subject wasn't a priority so we didn't dig a lot since my post. Moreover, I went in vacation... Thanks for your advice, I'll add this modification when back at the office, and look after a solution for the consumer part.

Pyrrha avatar Jul 20 '21 13:07 Pyrrha

It is happening in our cluster as well. We have almost 2000 topics, because of that we noticed a latency increase in kafka request handler because it is writing in the log4j files authorizer 1999 denied describe access(we changed for ERROR)…We’ll try to use bootstrap_topics_filter

dinegri avatar Sep 26 '21 21:09 dinegri