Hi,
Currently KafkaProducer.close() is called without timeout which can block thread indefinitely. This happens when there are undelivered records in producer's buffer and broker goes down (see KAFKA-1788).
Could please add possibility to close producer with timeout? I'd suggest adding some 'timeout' configuration value which defaults to Long.MAX_VALUE.
Thanks!