Hi Haruki, Thanks for your answer. > I still don't get why you need this behavior though The reason is I have to ensure message ordering per partition strictly. Once there is an exception in the producer callback, it indicates that the exception is not a retryable exception(from kafka producer's perspective). There must be something wrong, so I have to stop sending records and resolve the underlying issue.
As for the performance problem, I found a kafka wiki which investigated the impact of max.in.flight.requests.per.connection: An analysis of the impact of max.in.flight.requests.per.connection and acks on Producer performance - Apache Kafka - Apache Software Foundation <https://cwiki.apache.org/confluence/display/KAFKA/An+analysis+of+the+impact+of+max.in.flight.requests.per.connection+and+acks+on+Producer+performance> >From the wiki, max.in.flight.requests.per.connection is better set to 2 or more. By setting max.in.flight.requests.per.connection to 1, I'm concerned that this could become a performance bottleneck