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

Consumer/Producer config does not work with related enums

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • clients, config
    • None

    Description

      We have some code that builds producer/consumer config and sometimes uses the related enum like this,

      Properties properties = new Properties();
      
      properties.setProperty(ProducerConfig.COMPRESSION_TYPE_CONFIG, CompressionType.SNAPPY.name());
      ...
      
      Producer producer = new KafkaProducer(properties);
      

      We get,

      org.apache.kafka.common.KafkaException: Failed to construct kafka producer
      ...
      Caused by: java.lang.IllegalArgumentException: Unknown compression name: SNAPPY
      

      We've seen the same for others like ConsumerConfig.AUTO_OFFSET_RESET_CONFIG and its OffsetResetStrategy enum.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bbaugher Bryan Baugher
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: