You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by hi <99...@qq.com> on 2014/11/10 03:51:01 UTC

One question about "New Producer Configs"

Dear sir or madam,

    There is one question when I'm using Kafka:
    From the "documentation:New Producer Configs" ,I get that acks=n means the number of acknowledgments the producer requires the leader to have received before considering a request complete. But why can the producer  send messages successfully when I use the  Producer API‍ and  the acks is set to 2 (the number of partitions is 3 but there is only one partition‍ can work)? 

Thanks a lot and look forward to hearing from you soon.

Best Regards,

Genlong Wang
‍

‍‍‍

Re: One question about "New Producer Configs"

Posted by Guozhang Wang <wa...@gmail.com>.
Just some additions to Chia-Chun's response: each topic can have multiple
partitions and each partition can be replicated as multiple replicas on
different machines, acks = n means that the data sent to a particular
partition has been replicated to at least n replicas.

Guozhang

On Sun, Nov 9, 2014 at 11:27 PM, Chia-Chun Shih <ch...@gmail.com>
wrote:

> Dear Genlong,
>
> "New Producer Configs" is for upcoming versions. If you are using 0.8.1,
> please refer to "Producer Configs".
>
> acks=n, in which n means number of in-sync replicas, not number of
> partitions.
>
> regards,
> Chia-Chun
>
> 2014-11-10 10:51 GMT+08:00 hi <99...@qq.com>:
>
> > Dear sir or madam,
> >
> >     There is one question when I'm using Kafka:
> >     From the "documentation:New Producer Configs" ,I get that acks=n
> means
> > the number of acknowledgments the producer requires the leader to have
> > received before considering a request complete. But why can the producer
> > send messages successfully when I use the  Producer API‍ and  the acks is
> > set to 2 (the number of partitions is 3 but there is only one partition‍
> > can work)?
> >
> > Thanks a lot and look forward to hearing from you soon.
> >
> > Best Regards,
> >
> > Genlong Wang
> > ‍
> >
> > ‍‍‍
>



-- 
-- Guozhang

Re: One question about "New Producer Configs"

Posted by Chia-Chun Shih <ch...@gmail.com>.
Dear Genlong,

"New Producer Configs" is for upcoming versions. If you are using 0.8.1,
please refer to "Producer Configs".

acks=n, in which n means number of in-sync replicas, not number of
partitions.

regards,
Chia-Chun

2014-11-10 10:51 GMT+08:00 hi <99...@qq.com>:

> Dear sir or madam,
>
>     There is one question when I'm using Kafka:
>     From the "documentation:New Producer Configs" ,I get that acks=n means
> the number of acknowledgments the producer requires the leader to have
> received before considering a request complete. But why can the producer
> send messages successfully when I use the  Producer API‍ and  the acks is
> set to 2 (the number of partitions is 3 but there is only one partition‍
> can work)?
>
> Thanks a lot and look forward to hearing from you soon.
>
> Best Regards,
>
> Genlong Wang
> ‍
>
> ‍‍‍