huxihx commented on KAFKA-6446:

[~edosciullo] I tried this way and the fix passed on my local env. Since 
initTranscations is the very first method when a transaction starts, it's 
probably okay for us to only refine this method. 

However, even with this fix, the producer still failed be closed after throwing 
TimeoutException due to the fact that Sender thread got stuck and did not 
respond. I am not sure if it's fully safe to simply break from the catch clause 
in `maybeSendTransactionalRequest`.

> 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 
> 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

Reply via email to