kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jun Rao (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (KAFKA-1733) Producer.send will block indeterminately when broker is unavailable.
Date Tue, 04 Nov 2014 05:19:33 GMT

     [ https://issues.apache.org/jira/browse/KAFKA-1733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jun Rao resolved KAFKA-1733.
----------------------------
       Resolution: Fixed
    Fix Version/s: 0.8.3
         Assignee: Marc Chung

Thanks for the patch. +1 and committed to trunk.

> 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: Marc Chung
>             Fix For: 0.8.3
>
>         Attachments: kafka-1733-add-connectTimeoutMs.patch
>
>
> 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)

Mime
View raw message