Are request.required.acks and min.insync.replicas still supported? Should acks be used instead?

729 views
Skip to first unread message

Matthew Hayes

unread,
Nov 10, 2015, 9:17:33 PM11/10/15
to Confluent Platform
Hi,

I set these properties:

    props.put("request.required.acks", "-1");

    props.put("min.insync.replicas", 2);


But I see these warnings logged.  Are these configs no longer used? 

WARN The configuration min.insync.replicas = null was supplied but isn't a known config. (org.apache.kafka.clients.producer.ProducerConfig)

WARN The configuration request.required.acks = null was supplied but isn't a known config. (org.apache.kafka.clients.producer.ProducerConfig)


Should "acks" be used instead as their replacement?  Reading the documentation below I am a little confused.  Settings "acks" to "all" is supposedly the strongest guarantee.  According to the documentation this requires that all ISR send an ack.  But what if there is only 1 ISR because the other nodes are down?  Then it seems setting acks to 2 or 3 would be a stronger guarantee.


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


Thanks,

Matt


Gwen Shapira

unread,
Nov 10, 2015, 9:22:58 PM11/10/15
to confluent...@googlegroups.com
Hi Mathew,

Looks like you are using the new producer? In this case "acks = all" is identical to "request.required.acks=-1" in the old producer.

"min.insync.replicas" is a broker configuration and not a producer configuration. If you had it configured in the producer until now, it probably didn't do what you expected...

Gwen

--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/cc43016d-4cbe-474d-a061-56a380ecc628%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matthew Hayes

unread,
Nov 10, 2015, 9:30:29 PM11/10/15
to Confluent Platform
Ah thanks Gwen.  Yep I'm using the new producer.  I've just started to use these configs so wasn't sure.  So I could update the broker configuration to min.insync.replicas=2 and that would apply to all topics I'm assuming.  Then if I set "acks = all" will it require that there are at least 2 ISR for the request to succeed?

-Matt


On Tuesday, November 10, 2015 at 6:22:58 PM UTC-8, Gwen Shapira wrote:
Hi Mathew,

Looks like you are using the new producer? In this case "acks = all" is identical to "request.required.acks=-1" in the old producer.

"min.insync.replicas" is a broker configuration and not a producer configuration. If you had it configured in the producer until now, it probably didn't do what you expected...

Gwen
On Tue, Nov 10, 2015 at 6:17 PM, Matthew Hayes <matthew.te...@gmail.com> wrote:
Hi,

I set these properties:

    props.put("request.required.acks", "-1");

    props.put("min.insync.replicas", 2);


But I see these warnings logged.  Are these configs no longer used? 

WARN The configuration min.insync.replicas = null was supplied but isn't a known config. (org.apache.kafka.clients.producer.ProducerConfig)

WARN The configuration request.required.acks = null was supplied but isn't a known config. (org.apache.kafka.clients.producer.ProducerConfig)


Should "acks" be used instead as their replacement?  Reading the documentation below I am a little confused.  Settings "acks" to "all" is supposedly the strongest guarantee.  According to the documentation this requires that all ISR send an ack.  But what if there is only 1 ISR because the other nodes are down?  Then it seems setting acks to 2 or 3 would be a stronger guarantee.


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


Thanks,

Matt


--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.

Gwen Shapira

unread,
Nov 10, 2015, 9:33:19 PM11/10/15
to confluent...@googlegroups.com

Exactly.

On Nov 10, 2015 6:30 PM, "Matthew Hayes" <matthew.te...@gmail.com> wrote:
Ah thanks Gwen.  Yep I'm using the new producer.  I've just started to use these configs so wasn't sure.  So I could update the broker configuration to min.insync.replicas=2 and that would apply to all topics I'm assuming.  Then if I set "acks = all" will it require that there are at least 2 ISR for the request to succeed?

-Matt

On Tuesday, November 10, 2015 at 6:22:58 PM UTC-8, Gwen Shapira wrote:
Hi Mathew,

Looks like you are using the new producer? In this case "acks = all" is identical to "request.required.acks=-1" in the old producer.

"min.insync.replicas" is a broker configuration and not a producer configuration. If you had it configured in the producer until now, it probably didn't do what you expected...

Gwen
On Tue, Nov 10, 2015 at 6:17 PM, Matthew Hayes <matthew.te...@gmail.com> wrote:
Hi,

I set these properties:

    props.put("request.required.acks", "-1");

    props.put("min.insync.replicas", 2);


But I see these warnings logged.  Are these configs no longer used? 

WARN The configuration min.insync.replicas = null was supplied but isn't a known config. (org.apache.kafka.clients.producer.ProducerConfig)

WARN The configuration request.required.acks = null was supplied but isn't a known config. (org.apache.kafka.clients.producer.ProducerConfig)


Should "acks" be used instead as their replacement?  Reading the documentation below I am a little confused.  Settings "acks" to "all" is supposedly the strongest guarantee.  According to the documentation this requires that all ISR send an ack.  But what if there is only 1 ISR because the other nodes are down?  Then it seems setting acks to 2 or 3 would be a stronger guarantee.


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


Thanks,

Matt


--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.

To post to this group, send email to confluent...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages