[ https://issues.apache.org/jira/browse/KAFKA-5936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16172470#comment-16172470 ]
ASF GitHub Bot commented on KAFKA-5936: --------------------------------------- GitHub user mjsax opened a pull request: https://github.com/apache/kafka/pull/3912 KAFKA-5936: KafkaProducer.close should throw InterruptException You can merge this pull request into a Git repository by running: $ git pull https://github.com/mjsax/kafka kafka-5936-producer-close Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/3912.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3912 ---- commit c2d2f29dd8cd2249b1b4e830a24033eaa2806c0a Author: Matthias J. Sax <matth...@confluent.io> Date: 2017-09-19T22:48:54Z KAFKA-5936: KafkaProducer.close should throw InterruptException ---- > KafkaProducer should not wrap InterruptedException in close() with > KafkaException > --------------------------------------------------------------------------------- > > Key: KAFKA-5936 > URL: https://issues.apache.org/jira/browse/KAFKA-5936 > Project: Kafka > Issue Type: Bug > Components: clients > Affects Versions: 0.11.0.0, 0.11.0.1 > Reporter: Matthias J. Sax > Assignee: Matthias J. Sax > Fix For: 1.0.0 > > > {{KafkaProducer.close()}} catches an {{InterruptedException}} when joining > the sender thread and rethrows it later as a {{KafkaException}}. This prevent > the interrupt signal to bubble out of the producer and thus, the caller might > miss the interrupt. > We should rather throw our own > {{org.apache.kafka.common.errors.InterruptException}} similar to > {{KafkaConsumer}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029)