You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Luke Chen (Jira)" <ji...@apache.org> on 2022/02/17 07:12:00 UTC
[jira] [Created] (KAFKA-13673) disable idempotent producer when acks/retries/max.in.flight config conflicts
Luke Chen created KAFKA-13673:
---------------------------------
Summary: disable idempotent producer when acks/retries/max.in.flight config conflicts
Key: KAFKA-13673
URL: https://issues.apache.org/jira/browse/KAFKA-13673
Project: Kafka
Issue Type: Improvement
Reporter: Luke Chen
In KAFKA-13598, we enabled idempotent producer by default. When idempotence is enabled, there are some constraints:
- acks=all
- retries > 0
- max.in.flight.requests.per.connection <= 5
We found the default idempotence enabled setting will break some tests because the `acks`, `retries` config are overridden, and conflict with idempotence. And we believe there are many users also overriding these configs in current producers. We should avoid to break the existing producers after user upgrading to the newer version. So, we won't enable idempotence when the `enable.idempotence` is not set explicitly, and `acks`, `retries`, `max.in.flight.requests.per.connection` config is conflicting with idempotence setting. Below are some example cases the user will have:
# if user *doesn't* set enable.idempotence:
a. {{enable.idempotence}} unset && {{acks}} unset => enable idempotence (this was the intent behind the 3.0 change I think)
b. {{enable.idempotence}} unset && {{acks=all}} => enable idempotence
c. {{enable.idempotence}} unset && {{acks!=all}} => disable idempotence ({*}the case we will add in the Jira to avoid break existing producers{*})
# if user enable/disable enable.idempotence explicitly:
a. {{enable.idempotence=true}} && {{acks=all}} => enable idempotence
b. {{enable.idempotence=false}} => disable idempotence
c. {{enable.idempotence=true}} && {{acks!=all}} => throw exception ({*}still throw exception in this case{*})
PS. the above cases only use `acks` config for example. It also apply for `retries` and `max.in.flight.requests.per.connection` config.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)