I have a java client (using kafka client version 2.4.1) that is connected to a kafka (version 2.4.1) which have 5 topic with 5 partitions each. I am creating 1 thread per partition. My problem is that for each thread all the consumer configuration is logged :
First I would like to know if this is normal behavior (as I have 25 threads I am seeing 25 times theses logs) ? Maybe I am doing something wrong. At the moment each of my consumer thread is subscribing to it topic. So I am calling 25 times the method subscribe and each of the call seems to generate theses logs.
Then is there something I can do to disable them ?
It's normal behavior, it just log all consumer config each time you created a new KafkaConsumer
in each thread (this is right way to use multiple Consumer in a multi-threads application, each Consumer must only be used in a single thread).
You can disable Kafka log if you're using log4j, by adding a logger to filter out Kafka debug messages:
<loggers>
<logger name="org.apache.kafka" level="ERROR"/>
</loggers>