EsMoX opened a new pull request, #19041:
URL: https://github.com/apache/kafka/pull/19041

   The unit test `testInflightRequestsAndIdempotenceForIdempotentProducers` 
checks for configuration validation errors when instantiating a ProducerConfig 
with invalid properties. One of the assertions in this test is designed to 
validate the constraint that max.in.flight.requests.per.connection must be at 
most 5 when using a transactional producer. However, the error message thrown 
by the ProducerConfig constructor in this scenario is incorrect.
   
   **Observed Behavior**:
   When max.in.flight.requests.per.connection is set to 6 for a transactional 
producer, the test expects an exception with the message:
   "Must set max.in.flight.requests.per.connection to at most 5 when using the 
transactional producer."
   Instead, the error message states:
   "Must set retries to non-zero when using the idempotent producer."
   
   **Expected Behavio**r:
   The error message should explicitly indicate the violation of the 
max.in.flight.requests.per.connection constraint for transactional producers:
   "Must set max.in.flight.requests.per.connection to at most 5 when using the 
transactional producer."
   
   The mismatch in the error message can lead to confusion for developers 
debugging the configuration error, as it incorrectly hints at a retries 
configuration issue instead of the actual max.in.flight.requests.per.connection 
issue.
   
   Note: **the contribution is my original work and I license the work to the 
project under the project's open source license**


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to