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

getTopicMetadata does not respect producer config settings

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 0.8.0
    • 0.8.0
    • None
    • None

    Description

      ProducerPool.scala contains the following code:
      object ProducerPool{
      def createSyncProducer(configOpt: Option[ProducerConfig], broker: Broker): SyncProducer =

      { val props = new Properties() props.put("host", broker.host) props.put("port", broker.port.toString) if(configOpt.isDefined) props.putAll(configOpt.get.props.props) new SyncProducer(new SyncProducerConfig(props)) }

      }

      Note also, that ClientUtils.getTopicMetadata() does the following:
      ProducerPool.createSyncProducer(None, brokers)

      As a result there is no way to control the socket settings for the get metadata request.

      My recommendation is that we require the config to be specified in the

      Note that this creates a new sync producer without using ANY of the settings the user had given for the producer. In particular the socket timeout is defaulted to 500ms.

      This causes unit tests to fail a lot since a newly started test may easily timeout on a 500ms request.

      Attachments

        1. kafka-608-v1.patch
          23 kB
          Neha Narkhede
        2. kafka-608-v2.patch
          33 kB
          Neha Narkhede

        Issue Links

          Activity

            People

              nehanarkhede Neha Narkhede
              jkreps Jay Kreps
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: