I read about Kafka replication protocol. I found that Kafka maintains LEO and HW. As I understood,
LEO: Offset of latest message a replica has seen.
HW: Offset of the latest message which is guaranteed that each replica has seen.
Kafka producer can be set to these acknowledgement methods.
- acks = 0
- acks = 1
- acks = all
So my question is how the leader advances the HW depending on the acknowledgment method Kafka producer uses.
What I understood was,
for acks = 0, Leader advances the HW when it sees a new message.
for acks = 1, Leader advances the HW when it wrote new message to its local log.
for acks = all, Leader advances HW when each an every follower sent ack that they got the message.
Is this correct? Can anyone clarify this?