kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mathias Kub (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-4715) Consumer/Producer config does not work with related enums
Date Fri, 10 Feb 2017 10:32:42 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-4715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15861061#comment-15861061
] 

Mathias Kub commented on KAFKA-4715:
------------------------------------

I thought of `configValue`, because it better describes what the field is used for.

> Consumer/Producer config does not work with related enums
> ---------------------------------------------------------
>
>                 Key: KAFKA-4715
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4715
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Bryan Baugher
>            Priority: Minor
>
> We have some code that builds producer/consumer config and sometimes uses the related
enum like this,
> {code}
> Properties properties = new Properties();
> properties.setProperty(ProducerConfig.COMPRESSION_TYPE_CONFIG, CompressionType.SNAPPY.name());
> ...
> Producer producer = new KafkaProducer(properties);
> {code}
> We get,
> {code}
> org.apache.kafka.common.KafkaException: Failed to construct kafka producer
> ...
> Caused by: java.lang.IllegalArgumentException: Unknown compression name: SNAPPY
> {code}
> We've seen the same for others like ConsumerConfig.AUTO_OFFSET_RESET_CONFIG and its OffsetResetStrategy
enum.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message