Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-5086

Update topic expiry time in Metadata every time the topic metadata is requested

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.11.0.0
    • None
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              lindong Dong Lin
              lindong Dong Lin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: