Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Discussion thread: Here

JIRA: KAFKA-7711 

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).PRKAFKA-7569

Motivation

Currently the call to Producer.flush() can be hang there for indeterminate time.

...

Code Block
languagejava
titleKafkaProducer
@Override
public booleanvoid flush(Duration timeout)

This API returns true normally if flush succeed in time, i.e all previously sent records have completed ; otherwise if times out before finish sending all records, this method returns false. an TimeoutException will be thrown.

Proposed Changes

Before this proposal, there is only one flush() API, which the caller will be blocked util all the pending batches(at the moment of calling flush()) succeed or exhaust all the retries.

...