what happens if a replica leader in kafka dies after committing a message but before sending Highwater mark to ISR replicas?

193 Views Asked by At

From various documentation, I found that after getting acknowledgement from all the ISRs, kafka replica leader sends response back to the producer. After that, the leader periodically broadcast the HW(high water mark) to replicas. (correct me if I am wrong!)

Now, if a leader dies before broadcasting the HW, then the committed message will be lost. because new leader will discard all the message after its HW which was lagging from previous leader.

How does kafka ensure that this scenario never happens? according to kafka documentation, once a message is committed by the leader, it is persistent, never gets lost.

0

There are 0 best solutions below