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

KafkaProducer can't produce data

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.3.0
    • 2.3.0
    • clients, core

    Description

      Using a Producer from the current trunk (a6691fb79), I'm unable to produce data to a 2.2 broker.

      tl;dr;, I narrowed down the problem to https://github.com/apache/kafka/commit/a42f16f98 . My hypothesis is that some part of that commit broke backward compatibility with older brokers.

       

      Repro steps:

      I'm using this Producer config:

      final Properties properties = new Properties();
      properties.setProperty(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, BROKER);
      properties.setProperty(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getCanonicalName());
      properties.setProperty(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getCanonicalName());
      return properties;
      1. create a simple Producer to produce test data to a broker
      2. build against commmit a42f16f98 
      3. start an older broker. (I was using 2.1, and someone else reproduced it with 2.2)
      4. run your producer and note that it doesn't produce data (seems to hang, I see it produce 2 records in 1 minute)
      5. build against the predecessor commit 65aea1f36
      6. run your producer and note that it DOES produce data (I see it produce 1M records every 15 second)

      I've also confirmed that if I check out the current trunk (a6691fb79e2c55b3) and revert a42f16f98, I also observe that it produces as expected (1M every 15 seconds).

      Attachments

        Issue Links

          Activity

            People

              rsivaram Rajini Sivaram
              vvcephei John Roesler
              Manikumar Manikumar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: