kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yu LIU (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-6446) KafkaProducer with transactionId endless waits when bootstrap server is down
Date Mon, 29 Jan 2018 09:58:00 GMT

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

Yu LIU commented on KAFKA-6446:

I have a look at this and it appears that TRANSACTION_TIMEOUT_CONFIG is defined as the time
to wait when *a producer tries to get the producer id from transaction coordinator by specifying
transaction id*, more concretely it's for [InitProducerIdRequest|https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/requests/InitProducerIdRequest.java].
But where we hang here is before InitProducerIdRequest, we need to find the transaction coordinator
by sending a [FindCoordinatorRequest|https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/requests/FindCoordinatorRequest.java],
for this phase we didn't treat timeout case so it leads to the [Sender thread endless retrying
to send FindCoordinatorRequest|https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java#L161-L167].

So I think anyway the producer shoud not be stuck in initTransactions() when it can't connect
to the kafka cluster ? We should to define a new TIMEOUT for connecting to the cluster (FindCoordinatorRequest)
or applying the TRANSACTION_TIMEOUT_CONFIG to it directly ?

> KafkaProducer with transactionId endless waits when bootstrap server is down
> ----------------------------------------------------------------------------
>                 Key: KAFKA-6446
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6446
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients, producer 
>    Affects Versions:, 1.0.0
>            Reporter: Eduardo Sciullo
>            Priority: Critical
>         Attachments: Test.java
> When bootstrap server is down, a KafkaProducer with transactionId endless waits on initTransactions. 
> The timeouts don't apply to that operation: don't honor the {{TRANSACTION_TIMEOUT_CONFIG.}}
> Attached an example of my code to reproduce the scenario.
> I opened this issue as suggested by [Gary Russell|https://stackoverflow.com/users/1240763/gary-russell]
> [https://stackoverflow.com/questions/48226546/defaultkafkaproducerfactory-with-transactionidprefix-endless-waits-when-bootstra]

This message was sent by Atlassian JIRA

View raw message