GitHub user lindong28 opened a pull request: https://github.com/apache/kafka/pull/2869
Update topic expiry time in Metadata every time the topic metadata is requested As of current implementation, KafkaProducer.waitOnMetadata() will first reset topic expiry time of the topic before repeatedly sending TopicMetadataRequest and waiting for metadata response. However, if the metadata of the topic is not available within Metadata.TOPIC_EXPIRY_MS, which is set to 5 minutes, then the topic will be expired and removed from Metadata.topics. The TopicMetadataRequest will no longer include the topic and the KafkaProducer will never receive the metadata of this topic. It will enter an infinite loop of sending TopicMetadataRequest and waiting for metadata response. This problem can be fixed by updating topic expiry time every time the topic metadata is requested. You can merge this pull request into a Git repository by running: $ git pull https://github.com/lindong28/kafka KAFKA-5086 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/2869.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2869 ---- commit cdd239fbf3249ac746b17dc203ff40bcda56516c Author: Dong Lin <lindon...@gmail.com> Date: 2017-04-19T04:07:48Z Update topic expiry time in Metadata every time the topic metadata is requested ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---