[
https://issues.apache.org/jira/browse/KAFKA-21471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lucy Liu reassigned KAFKA-21471:
--------------------------------
Assignee: Lucy Liu (was: Chia-Ping Tsai)
> 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: Lucy Liu
> Priority: Minor
>
>
> {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)