Chia-Ping Tsai created KAFKA-21471:
--------------------------------------

             Summary: KafkaProducer#close should not wait for the empty 
transaction
                 Key: KAFKA-21471
                 URL: https://issues.apache.org/jira/browse/KAFKA-21471
             Project: Kafka
          Issue Type: Bug
            Reporter: Chia-Ping Tsai
            Assignee: Chia-Ping Tsai


 
{code:java}
        producer.beginTransaction();
        long start = System.nanoTime();
        producer.close();
        long elapsedMs = 
java.util.concurrent.TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - start);  
      org.junit.jupiter.api.Assertions.assertTrue(elapsedMs < 5000,
                "close() took " + elapsedMs + " ms with an empty transaction");
{code}
There is no response from the server for an empty transaction, so the sender 
should skip the waiting and close quickly.

 



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to