0
votes

The notion of "committed" about message is often confusing. I come across this,from https://www.confluent.io/blog/hands-free-kafka-replication-a-lesson-in-operational-simplicity/

A message is committed only after it has been successfully copied to all the in-sync replicas.

I guess "all" here refers to all replicas that depends on replication factor. Say, if replication factor is 3 , for a consumer to consume this message , the message should present in all the replicas ( not necessarily disk ? ) irrespective of "acks" setting. Hope my understanding is correct .

At this point of time, since we are not living in ideal world where every thing works as expected :-) - one of the brokers is down , and the message is sent by the producer - assuming this message is acked but not "committed" completely since one broker is down.

Assuming this broker will not come up forever ( replica.lag.time.max.ms - this value is also lapsed), can we assume the consumer cant receive this message by default ?

1

1 Answers

1
votes

The important part in the description is **in-sync** replicas. Replicas that are not in-sync don't count.

So if a broker is down, it's not part of any in-sync replicas and won't prevent a record to be marked as committed to the log. This allows brokers to move their high watermarks and expose this record to consumers.

You are right, the record does not need to have been flushed on disk. Replicas just need to have fetched it and it could still be in memory.