Hi ,

I am using kafka 0.9.0.x and in a multithreaded system I have created only
one instance of Kafka producer.

When I say producer.close(); it only closes communication and cannot send
the messages on topic.

BUT why its object is still valid if we cannot send requests to it. 

 

Moreover, I can understand kafka producer threads opened and not closed will
leak resources,

Why kafka cannot have a timer on Producer thread if it is idle close it and
make it available for GC and on need recreate it?

 

Thanks 

Usman.

Reply via email to