Skip to content

DefaultKafkaProducerFactory: add timeout to KafkaProducer.close() #338

@andrei-tytsik

Description

@andrei-tytsik

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!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions