You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Marc Chung (JIRA)" <ji...@apache.org> on 2014/10/27 19:13:34 UTC
[jira] [Commented] (KAFKA-1733) Producer.send will block
indeterminately when broker is unavailable.
[ https://issues.apache.org/jira/browse/KAFKA-1733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14185539#comment-14185539 ]
Marc Chung commented on KAFKA-1733:
-----------------------------------
I have a patch (work in progress) here: https://github.com/mchung/kafka/commit/87b8ddbfe23dc887f56fa6f9ea3669733933c49b
> Producer.send will block indeterminately when broker is unavailable.
> --------------------------------------------------------------------
>
> Key: KAFKA-1733
> URL: https://issues.apache.org/jira/browse/KAFKA-1733
> Project: Kafka
> Issue Type: Bug
> Components: core, producer
> Reporter: Marc Chung
> Assignee: Jun Rao
>
> This is a follow up to the conversation here:
> https://mail-archives.apache.org/mod_mbox/kafka-dev/201409.mbox/%3CCAOG_4QYMoEJHKbo0N31+A-UjX0z5unSiSD5WbrmN-XtX7giP-Q@mail.gmail.com%3E
> During ClientUtils.fetchTopicMetadata, if the broker is unavailable, socket.connect will block indeterminately. Any retry policy (message.send.max.retries) further increases the time spent waiting for the socket to connect.
> The root fix is to add a connection timeout value to the BlockingChannel's socket configuration, like so:
> {noformat}
> -channel.socket.connect(new InetSocketAddress(host, port))
> +channel.socket.connect(new InetSocketAddress(host, port), connectTimeoutMs)
> {noformat}
> The simplest thing to do here would be to have a constant, default value that would be applied to every socket configuration.
> Is that acceptable?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)