Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is AdminClient in package kafka-clients thread safe?

I need to provide existention of kafka topic before producing events and default kafka topic autocreate is not adequate. I have desided to use AdminClient class but I am worried about concurency issues.
There is no information about thread safety AdminClient in documentation for Apache Kafka 2.2.x. Does somebody have any idea?

like image 397
marosbfm Avatar asked Nov 17 '25 23:11

marosbfm


1 Answers

Yes, Apache Kafka's AdminClient is thread-safe, in every version of Kafka which it appears in. We will create a PR to update the documentation (I thought it was in the JavaDoc already, but it looks like not.)

like image 144
cmccabe Avatar answered Nov 20 '25 15:11

cmccabe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!