Let’s assume such a situation:
There is a Java Spring application, that reads messages from Kafka
(Customer group: MyGroupName).
- messages appear on Kafka:
msg_1
,msg_2
,msg_3
- application reads messages:
msg_1
,msg_2
,msg_3
after each sending ack. - application is turned off/crashes
- new messages appear on Kafka:
msg_4
,msg_5
,msg_6
- application starts running and reconnects to Kafka again in customer group MyGroupName
(We can see in Kafka UI that Lags:3) - new messages appear on Kafka:
msg_7
,msg_8
and then, if I set AUTO_OFFSET_RESET_CONFIG
to:
latest
: the application will read messages frommsg_4
,...
,msg_8
earliest
: the application will read messages frommsg_1
,...
,msg_8
And my question is: what should be configured to read only messages that appears on Kafka after reconnect? (only msg_7
,msg_8
)?