You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/07/03 09:23:00 UTC

[jira] [Commented] (KAFKA-3539) KafkaProducer.send() may block even though it returns the Future

    [ https://issues.apache.org/jira/browse/KAFKA-3539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16072163#comment-16072163 ] 

ASF GitHub Bot commented on KAFKA-3539:
---------------------------------------

GitHub user evis opened a pull request:

    https://github.com/apache/kafka/pull/3478

    KAFKA-3539: KafkaProducer.send() should not block

    Just wrapped current `doSend()` method invocation into another `Future` to get rid of blocking while calling `KafkaProducer#send()`. I know, that a lot of tests will be failed (including one I added), just want to know, is it appropriate to do such thing? If it is, I will try to fix tests.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/evis/kafka 3539-producer-send-blocks

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/3478.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 #3478
    
----
commit add2c39023dda5a5c49cba69fb7a467bf57d8eda
Author: Evgeny Veretennikov <ev...@gmail.com>
Date:   2017-07-03T09:18:50Z

    KAFKA-3539: KafkaProducer.send() should not block

----


> KafkaProducer.send() may block even though it returns the Future
> ----------------------------------------------------------------
>
>                 Key: KAFKA-3539
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3539
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Oleg Zhurakousky
>            Assignee: Evgeny Veretennikov
>            Priority: Critical
>
> You can get more details from the users@kafka.apache.org by searching on the thread with the subject "KafkaProducer block on send".
> The bottom line is that method that returns Future must never block, since it essentially violates the Future contract as it was specifically designed to return immediately passing control back to the user to check for completion, cancel etc.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)