frankvicky commented on code in PR #17717:
URL: https://github.com/apache/kafka/pull/17717#discussion_r1833859572


##########
clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java:
##########
@@ -582,13 +582,8 @@ private void 
postProcessAndValidateIdempotenceConfigs(final Map<String, Object>
 
             final int inFlightConnection = 
this.getInt(MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION);
             if (MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION_FOR_IDEMPOTENCE < 
inFlightConnection) {
-                if (userConfiguredIdempotence) {
-                    throw new ConfigException("Must set " + 
MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION + " to at most 5" +
-                        " to use the idempotent producer.");
-                }
-                log.warn("Idempotence will be disabled because {} is set to 
{}, which is greater than 5. " +
-                    "Please note that in v4.0.0 and onward, this will become 
an error.", MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION, inFlightConnection);
-                shouldDisableIdempotence = true;
+                throw new ConfigException("To use the idempotent producer, " + 
MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION +

Review Comment:
   Hmmm… This logic indeed covers the case where `enable.idempotence` is set to 
`true`, but we don’t want this constraint if `enable.idempotence` is explicit 
set to `false`, right?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to