You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Vikas Kumar <he...@gmail.com> on 2016/07/01 10:17:06 UTC

Handling of uncommitted messages

Hi,

I have a question about handling of uncommitted messages in Kafka.

Lets say the partition has 4 replicas (1 leader, 3 followers) and all are
currently in sync. min.insync.replicas is set to 3 and
request.required.acks is set to all or -1.

The producer send a message to the leader, the leader appends it to it's
log. After that, two of the replicas crashed before they could fetch this
message. One remaining replica successfully fetched the message and
appended to it's own log.

The leader, after certain timeout, will send an error (NotEnoughReplicas, I
think) to the producer since min.insync.replicas condition is not met.

My question is: what will happen to the message which was appended to
leader and one of the replica's log?

Will it be delivered to the consumers when crashed replicas come back
online and broker starts accepting and committing new messages (i.e. high
watermark is forwarded in the log)?

Re: Handling of uncommitted messages

Posted by "Matthias J. Sax" <ma...@confluent.io>.
http://www.confluent.io/blog/hands-free-kafka-replication-a-lesson-in-operational-simplicity/

From my understanding, the watermark will not advance until both failed
follow-broker recovered and caught up.

-Matthias


On 07/01/2016 12:17 PM, Vikas Kumar wrote:
> Hi,
> 
> I have a question about handling of uncommitted messages in Kafka.
> 
> Lets say the partition has 4 replicas (1 leader, 3 followers) and all are
> currently in sync. min.insync.replicas is set to 3 and
> request.required.acks is set to all or -1.
> 
> The producer send a message to the leader, the leader appends it to it's
> log. After that, two of the replicas crashed before they could fetch this
> message. One remaining replica successfully fetched the message and
> appended to it's own log.
> 
> The leader, after certain timeout, will send an error (NotEnoughReplicas, I
> think) to the producer since min.insync.replicas condition is not met.
> 
> My question is: what will happen to the message which was appended to
> leader and one of the replica's log?
> 
> Will it be delivered to the consumers when crashed replicas come back
> online and broker starts accepting and committing new messages (i.e. high
> watermark is forwarded in the log)?
>