spring-kafka AckMode中MANUAL和MANUAL_IMMEDIATE有什么区别
What is the difference between MANUAL and MANUAL_IMMEDIATE in spring-kafka AckMode
从spring-docs,我可以看到
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.
但是,如果侦听器正在提交偏移量,那么究竟有什么区别。 MANUAL
模式
完成了哪些额外步骤
MANUAL - 当上次轮询的所有结果都已处理后,acks 排队并在一个操作中提交偏移量。
MANUAL_IMMEDIATE - 只要在侦听器线程上执行确认,就会立即提交偏移量(同步或异步)。
从spring-docs,我可以看到
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.
但是,如果侦听器正在提交偏移量,那么究竟有什么区别。 MANUAL
模式
MANUAL - 当上次轮询的所有结果都已处理后,acks 排队并在一个操作中提交偏移量。
MANUAL_IMMEDIATE - 只要在侦听器线程上执行确认,就会立即提交偏移量(同步或异步)。