The use case is following. I am passing producer or consumer reference over many objects instances in Java code. At some of them I would like to do some checks for the Kafka configuration. It means I would like to get back, what effective configuration is stored in Kafka Producer/Consumer (including defaults). I do not see anthing explicit in java docs:
So, how to get back Kafka producer and consumer configuration?
The send() method is asynchronous. When called it adds the record to a buffer of pending record sends and immediately returns. This allows the producer to batch together individual records for efficiency. The acks config controls the criteria under which requests are considered complete.
The Kafka Producer API allows applications to send streams of data to the Kafka cluster. The Kafka Consumer API allows applications to read streams of data from the cluster.
Unfortunately it's not possible. I have to admit it could be a useful feature for showing the "core" configuration properties at least (avoiding the possibility to get the "secrets" for authentication stuff for example). The only solution that I see today for you is to have a link between the consumer/producer instance and the related properties bag used for setting the client configuration. I understand it's a waste of memory because such configuration is internally in the client but you need to keep your properties bag for having it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With