leeleeian commented on PR #13418: URL: https://github.com/apache/kafka/pull/13418#issuecomment-1475609004
Here is the use case. Multiple threads use the KafkaProducer. If there is error in sending, the (previous) KafkaProducer is closed and a new KafkaProducer recreated. For recreation, it suffices to be done by one thread - hence each thread would check whether the `KafkaProducer` instance it uses has changed. For this reason, we want to compare KafkaProducer instances. The default equals method compares by address. But this is not what we want. Hence this PR is proposed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org