A potential source of serious bugs would be if a message is sent while the producer is closed. This causes my application to hang indefinitely.
I'd like to handle this case appropriately by raising an error, but there doesn't seem to be a method in the API for checking if a producer is closed.
https://kafka.apache.org/090/javadoc/index.html?org/apache/kafka/clients/producer/KafkaProducer.html
Is there any way to do this?