You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Grant Henke (JIRA)" <ji...@apache.org> on 2016/01/26 04:57:39 UTC

[jira] [Resolved] (KAFKA-2268) New producer logs WARN if serializer supplied directly to constructor

     [ https://issues.apache.org/jira/browse/KAFKA-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Henke resolved KAFKA-2268.
--------------------------------
    Resolution: Duplicate

> New producer logs WARN if serializer supplied directly to constructor
> ---------------------------------------------------------------------
>
>                 Key: KAFKA-2268
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2268
>             Project: Kafka
>          Issue Type: Bug
>          Components: producer 
>    Affects Versions: 0.8.2.1
>            Reporter: Morten Lied Johansen
>            Assignee: Jun Rao
>            Priority: Trivial
>
> When creating a new KafkaProducer by passing in a configuration-map, a key serializer and a value serializer, two warnings are logged:
> {noformat}
> [WARN ] [2015-06-15T14:26:36,271] The configuration value.serializer = class no.finntech.commons.kafka.ThriftSerializer was supplied but isn't a known config. [org.apache.kafka.common.config.AbstractConfig.logUnused(AbstractConfig.java:121)] [RMI TCP Connection(2)-127.0.0.1]
> [WARN ] [2015-06-15T14:26:36,271] The configuration key.serializer = class org.apache.kafka.common.serialization.StringSerializer was supplied but isn't a known config. [org.apache.kafka.common.config.AbstractConfig.logUnused(AbstractConfig.java:121)] [RMI TCP Connection(2)-127.0.0.1]
> {noformat}
> This happens because this constructor adds the serializers to the config (KafkaProducer.java:108), and then ignores that configuration since the instances are already present (KafkaProducer.java:215). Finally, it checks which parts of the configuration were used, and logs warnings for the remaining keys (KafkaProducer.java:230).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)