What is the difference between MANUAL and MANUAL_IMMEDIATE in spring-kafka AckMode

Viewed 8231

From spring-docs, I can see

MANUAL - the message listener is responsible to acknowledge() the Acknowledgment; after which, the same semantics as BATCH are applied.

MANUAL_IMMEDIATE - commit the offset immediately when the Acknowledgment.acknowledge() method is called by the listener.

But what exactly is the difference if the listener is committing the offset. What additional steps are done for MANUAL mode

1 Answers

MANUAL - acks are queued and the offsets committed in one operation when all the results from the last poll have been processed.

MANUAL_IMMEDIATE - the offset is committed immediately (sync or async) as long as the ack is performed on the listener thread.

Related