Hi,

4

I read about the 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
persisted into their local log.

We can set the following acknowledgement methods in Kafka producers
configurations.


   1. acks = 0 (Leader replica sends an acknowledgement to the producer
      once it has seen the message)
      2. acks = 1 (Leader replica sends an acknowledgement to the producer
      once it has persisted the message to its local log)
      3. acks = all (Leader replica sends an acknowledgement to the
      producer once every in-sync replica has persisted the message to
its local
      log)

So my question is how the leader advances the HW depending on the
acknowledgement method message producer uses.

What I think is,

   1.

   for acks = 0, Leader advances the HW when it sees a new message.
   2.

   for acks = 1, Leader advances the HW when it has written the new message
   to its local log.
   3.

   for acks = all, Leader advances HW when each an every follower sent ack
   that they persisted the message.

Is this correct? Can anyone clarify this?

Thanks

Reply via email to