This is an automated email from the ASF dual-hosted git repository.

divijv pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 400ecab5189 KAFKA-13810: Document behavior of KafkaProducer.flush() 
w.r.t callbacks (#12042)
400ecab5189 is described below

commit 400ecab5189f68881223b7a1d8194214102e6784
Author: Karsten Spang <[email protected]>
AuthorDate: Thu Jan 23 17:20:30 2025 +0100

    KAFKA-13810: Document behavior of KafkaProducer.flush() w.r.t callbacks 
(#12042)
    
    Reviewers: Luke Chen <[email protected]>, Andrew Eugene Choi 
<[email protected]>
---
 .../src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java 
b/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
index 648de3ab4b9..64930b36e27 100644
--- a/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
+++ b/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
@@ -1154,7 +1154,8 @@ public class KafkaProducer<K, V> implements Producer<K, 
V> {
     /**
      * Invoking this method makes all buffered records immediately available 
to send (even if <code>linger.ms</code> is
      * greater than 0) and blocks on the completion of the requests associated 
with these records. The post-condition
-     * of <code>flush()</code> is that any previously sent record will have 
completed (e.g. <code>Future.isDone() == true</code>).
+     * of <code>flush()</code> is that any previously sent record will have 
completed (e.g. <code>Future.isDone() == true</code>
+     * and callbacks passed to {@link #send(ProducerRecord,Callback)} have 
been called).
      * A request is considered completed when it is successfully acknowledged
      * according to the <code>acks</code> configuration you have specified or 
else it results in an error.
      * <p>

Reply via email to