AndrewJSchofield commented on code in PR #18112: URL: https://github.com/apache/kafka/pull/18112#discussion_r1877681402
########## clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java: ########## @@ -1219,11 +1219,19 @@ private void ensureValidRecordSize(int size) { * flush all buffered records before performing the commit. This ensures that all the {@link #send(ProducerRecord)} * calls made since the previous {@link #beginTransaction()} are completed before the commit. * </p> + * <p> + * <b>Important:</b> This method should not be used within the callback provided to + * {@link #send(ProducerRecord, Callback)}.Invoking <code>flush()</code> in this context will cause a deadlock. Review Comment: nit: Space before "Invoking" please. -- 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