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

Shouw throw exception when serializer.class if not configured for Producer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • 0.7
    • None
    • config, core

    Description

      val props = new Properties();
      props.put("zk.connect", "127.0.0.1:2181");
      props.put("producer.type", "async");
      props.put("batch.size", "50")
      props.put("serializer.class", "kafka.serializer.StringEncoder");
      props.put("compression.codec", "1") //gzip
      val config = new ProducerConfig(props);

      If remove the serializer.class config : props.put("serializer.class", "kafka.serializer.StringEncoder"); The consumer-shell can no longer get the messages published by producer, so it's like there's something wrong, but no exception got.

      Attachments

        Activity

          People

            Unassigned Unassigned
            stonegao Stone Gao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: