[
https://issues.apache.org/jira/browse/KAFKA-6516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16348499#comment-16348499
]
Rajini Sivaram commented on KAFKA-6516:
---
[~ecomar] We don't stop the sender thread if authentication fails. The
intention was to provide feedback via an exception if the producer was
configured with invalid credentials. But we don't close the producer - we
expect that the application will see the exception and close the producer and
hence the sender thread is left running until the producer is closed.
If authentication fails because a producer makes a connection before its
credentials are available on a broker, we throw an exception to indicate that
authentication failed, but we allow the application to retry. This should work
because we don't close the producer and the sender thread is still active.
> KafkaProducer retries indefinitely to authenticate on
> SaslAuthenticationException
> -
>
> Key: KAFKA-6516
> URL: https://issues.apache.org/jira/browse/KAFKA-6516
> Project: Kafka
> Issue Type: Bug
> Components: clients
>Affects Versions: 1.0.0
>Reporter: Edoardo Comar
>Priority: Major
>
> Even after https://issues.apache.org/jira/browse/KAFKA-5854
> the producer's (background) polling thread keeps retrying to authenticate.
> if the future returned by KafkaProducer.send is not resolved.
> The current test
> {{org.apache.kafka.common.security.authenticator.ClientAuthenticationFailureTest.testProducerWithInvalidCredentials()}}
> passes because it relies on the future being resolved.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)