You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Kane Kane <ka...@gmail.com> on 2013/10/25 03:50:31 UTC

how request.required.acks works

If i set request.required.acks to -1, and set relatively short
request.timeout.ms and timeout happens before all replicas acknowledge the
write - would be message written to the leader or dropped?

Re: how request.required.acks works

Posted by Kane Kane <ka...@gmail.com>.
Thanks a lot Guohang, this makes sense.


On Fri, Oct 25, 2013 at 10:32 AM, Guozhang Wang <wa...@gmail.com> wrote:

> Hi Kane,
>
> You can find details of request.timeout.ms here:
>
> http://kafka.apache.org/documentation.html#configuration
>
> And yes, if a "timeout" response to sent back to the producer, it means the
> message may or may not have been committed.
>
> Guozhang
>
>
> On Fri, Oct 25, 2013 at 8:05 AM, Kane Kane <ka...@gmail.com> wrote:
>
> > Hello Neha,
> > Can you explain please what this means:
> > request.timeout.ms - The amount of time the broker will wait trying to
> > meet
> > the request.required.acks requirement before sending back an error to the
> > client.
> >
> > So the message will be committed even though broker sends error to
> client?
> >
> >
> > On Fri, Oct 25, 2013 at 7:41 AM, Neha Narkhede <neha.narkhede@gmail.com
> > >wrote:
> >
> > > The producer acknowledgement is independent of the leader follower
> > > replication. So if the message is written to the leader and the
> followers
> > > are healthy, the message will get committed.
> > >
> > > Thanks,
> > > Neha
> > > On Oct 24, 2013 8:35 PM, "Kane Kane" <ka...@gmail.com> wrote:
> > >
> > > > Hello Neha, does it mean even if not all replica acknowledged and
> > timeout
> > > > kicked in and producer get an exception - message still will be
> > written?
> > > >
> > > > Thanks.
> > > >
> > > >
> > > > On Thu, Oct 24, 2013 at 8:08 PM, Neha Narkhede <
> > neha.narkhede@gmail.com
> > > > >wrote:
> > > >
> > > > > The message will be written to the leader as well as the replicas.
> > > > >
> > > > > Thanks,
> > > > > Neha
> > > > >
> > > > >
> > > > > On Thu, Oct 24, 2013 at 7:08 PM, Guozhang Wang <wangguoz@gmail.com
> >
> > > > wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > In this case the request would be treated as timed out and hence
> > > > failed,
> > > > > if
> > > > > > the producer is async then after the number of retries it still
> > > failed,
> > > > > the
> > > > > > messages will be dropped.
> > > > > >
> > > > > > Guozhang
> > > > > >
> > > > > >
> > > > > > On Thu, Oct 24, 2013 at 6:50 PM, Kane Kane <
> kane.isturm@gmail.com>
> > > > > wrote:
> > > > > >
> > > > > > > If i set request.required.acks to -1, and set relatively short
> > > > > > > request.timeout.ms and timeout happens before all replicas
> > > > acknowledge
> > > > > > the
> > > > > > > write - would be message written to the leader or dropped?
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > -- Guozhang
> > > > > >
> > > > >
> > > >
> > >
> >
>
>
>
> --
> -- Guozhang
>

Re: how request.required.acks works

Posted by Guozhang Wang <wa...@gmail.com>.
Hi Kane,

You can find details of request.timeout.ms here:

http://kafka.apache.org/documentation.html#configuration

And yes, if a "timeout" response to sent back to the producer, it means the
message may or may not have been committed.

Guozhang


On Fri, Oct 25, 2013 at 8:05 AM, Kane Kane <ka...@gmail.com> wrote:

> Hello Neha,
> Can you explain please what this means:
> request.timeout.ms - The amount of time the broker will wait trying to
> meet
> the request.required.acks requirement before sending back an error to the
> client.
>
> So the message will be committed even though broker sends error to client?
>
>
> On Fri, Oct 25, 2013 at 7:41 AM, Neha Narkhede <neha.narkhede@gmail.com
> >wrote:
>
> > The producer acknowledgement is independent of the leader follower
> > replication. So if the message is written to the leader and the followers
> > are healthy, the message will get committed.
> >
> > Thanks,
> > Neha
> > On Oct 24, 2013 8:35 PM, "Kane Kane" <ka...@gmail.com> wrote:
> >
> > > Hello Neha, does it mean even if not all replica acknowledged and
> timeout
> > > kicked in and producer get an exception - message still will be
> written?
> > >
> > > Thanks.
> > >
> > >
> > > On Thu, Oct 24, 2013 at 8:08 PM, Neha Narkhede <
> neha.narkhede@gmail.com
> > > >wrote:
> > >
> > > > The message will be written to the leader as well as the replicas.
> > > >
> > > > Thanks,
> > > > Neha
> > > >
> > > >
> > > > On Thu, Oct 24, 2013 at 7:08 PM, Guozhang Wang <wa...@gmail.com>
> > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > In this case the request would be treated as timed out and hence
> > > failed,
> > > > if
> > > > > the producer is async then after the number of retries it still
> > failed,
> > > > the
> > > > > messages will be dropped.
> > > > >
> > > > > Guozhang
> > > > >
> > > > >
> > > > > On Thu, Oct 24, 2013 at 6:50 PM, Kane Kane <ka...@gmail.com>
> > > > wrote:
> > > > >
> > > > > > If i set request.required.acks to -1, and set relatively short
> > > > > > request.timeout.ms and timeout happens before all replicas
> > > acknowledge
> > > > > the
> > > > > > write - would be message written to the leader or dropped?
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > -- Guozhang
> > > > >
> > > >
> > >
> >
>



-- 
-- Guozhang

Re: how request.required.acks works

Posted by Kane Kane <ka...@gmail.com>.
Hello Neha,
Can you explain please what this means:
request.timeout.ms - The amount of time the broker will wait trying to meet
the request.required.acks requirement before sending back an error to the
client.

So the message will be committed even though broker sends error to client?


On Fri, Oct 25, 2013 at 7:41 AM, Neha Narkhede <ne...@gmail.com>wrote:

> The producer acknowledgement is independent of the leader follower
> replication. So if the message is written to the leader and the followers
> are healthy, the message will get committed.
>
> Thanks,
> Neha
> On Oct 24, 2013 8:35 PM, "Kane Kane" <ka...@gmail.com> wrote:
>
> > Hello Neha, does it mean even if not all replica acknowledged and timeout
> > kicked in and producer get an exception - message still will be written?
> >
> > Thanks.
> >
> >
> > On Thu, Oct 24, 2013 at 8:08 PM, Neha Narkhede <neha.narkhede@gmail.com
> > >wrote:
> >
> > > The message will be written to the leader as well as the replicas.
> > >
> > > Thanks,
> > > Neha
> > >
> > >
> > > On Thu, Oct 24, 2013 at 7:08 PM, Guozhang Wang <wa...@gmail.com>
> > wrote:
> > >
> > > > Hi,
> > > >
> > > > In this case the request would be treated as timed out and hence
> > failed,
> > > if
> > > > the producer is async then after the number of retries it still
> failed,
> > > the
> > > > messages will be dropped.
> > > >
> > > > Guozhang
> > > >
> > > >
> > > > On Thu, Oct 24, 2013 at 6:50 PM, Kane Kane <ka...@gmail.com>
> > > wrote:
> > > >
> > > > > If i set request.required.acks to -1, and set relatively short
> > > > > request.timeout.ms and timeout happens before all replicas
> > acknowledge
> > > > the
> > > > > write - would be message written to the leader or dropped?
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > -- Guozhang
> > > >
> > >
> >
>

Re: how request.required.acks works

Posted by Neha Narkhede <ne...@gmail.com>.
The producer acknowledgement is independent of the leader follower
replication. So if the message is written to the leader and the followers
are healthy, the message will get committed.

Thanks,
Neha
On Oct 24, 2013 8:35 PM, "Kane Kane" <ka...@gmail.com> wrote:

> Hello Neha, does it mean even if not all replica acknowledged and timeout
> kicked in and producer get an exception - message still will be written?
>
> Thanks.
>
>
> On Thu, Oct 24, 2013 at 8:08 PM, Neha Narkhede <neha.narkhede@gmail.com
> >wrote:
>
> > The message will be written to the leader as well as the replicas.
> >
> > Thanks,
> > Neha
> >
> >
> > On Thu, Oct 24, 2013 at 7:08 PM, Guozhang Wang <wa...@gmail.com>
> wrote:
> >
> > > Hi,
> > >
> > > In this case the request would be treated as timed out and hence
> failed,
> > if
> > > the producer is async then after the number of retries it still failed,
> > the
> > > messages will be dropped.
> > >
> > > Guozhang
> > >
> > >
> > > On Thu, Oct 24, 2013 at 6:50 PM, Kane Kane <ka...@gmail.com>
> > wrote:
> > >
> > > > If i set request.required.acks to -1, and set relatively short
> > > > request.timeout.ms and timeout happens before all replicas
> acknowledge
> > > the
> > > > write - would be message written to the leader or dropped?
> > > >
> > >
> > >
> > >
> > > --
> > > -- Guozhang
> > >
> >
>

Re: how request.required.acks works

Posted by Kane Kane <ka...@gmail.com>.
Hello Neha, does it mean even if not all replica acknowledged and timeout
kicked in and producer get an exception - message still will be written?

Thanks.


On Thu, Oct 24, 2013 at 8:08 PM, Neha Narkhede <ne...@gmail.com>wrote:

> The message will be written to the leader as well as the replicas.
>
> Thanks,
> Neha
>
>
> On Thu, Oct 24, 2013 at 7:08 PM, Guozhang Wang <wa...@gmail.com> wrote:
>
> > Hi,
> >
> > In this case the request would be treated as timed out and hence failed,
> if
> > the producer is async then after the number of retries it still failed,
> the
> > messages will be dropped.
> >
> > Guozhang
> >
> >
> > On Thu, Oct 24, 2013 at 6:50 PM, Kane Kane <ka...@gmail.com>
> wrote:
> >
> > > If i set request.required.acks to -1, and set relatively short
> > > request.timeout.ms and timeout happens before all replicas acknowledge
> > the
> > > write - would be message written to the leader or dropped?
> > >
> >
> >
> >
> > --
> > -- Guozhang
> >
>

Re: how request.required.acks works

Posted by Neha Narkhede <ne...@gmail.com>.
The message will be written to the leader as well as the replicas.

Thanks,
Neha


On Thu, Oct 24, 2013 at 7:08 PM, Guozhang Wang <wa...@gmail.com> wrote:

> Hi,
>
> In this case the request would be treated as timed out and hence failed, if
> the producer is async then after the number of retries it still failed, the
> messages will be dropped.
>
> Guozhang
>
>
> On Thu, Oct 24, 2013 at 6:50 PM, Kane Kane <ka...@gmail.com> wrote:
>
> > If i set request.required.acks to -1, and set relatively short
> > request.timeout.ms and timeout happens before all replicas acknowledge
> the
> > write - would be message written to the leader or dropped?
> >
>
>
>
> --
> -- Guozhang
>

Re: how request.required.acks works

Posted by Guozhang Wang <wa...@gmail.com>.
Hi,

In this case the request would be treated as timed out and hence failed, if
the producer is async then after the number of retries it still failed, the
messages will be dropped.

Guozhang


On Thu, Oct 24, 2013 at 6:50 PM, Kane Kane <ka...@gmail.com> wrote:

> If i set request.required.acks to -1, and set relatively short
> request.timeout.ms and timeout happens before all replicas acknowledge the
> write - would be message written to the leader or dropped?
>



-- 
-- Guozhang