You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Guozhang Wang (JIRA)" <ji...@apache.org> on 2017/06/02 19:39:04 UTC

[jira] [Updated] (KAFKA-3982) Issue with processing order of consumer properties in console consumer

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

Guozhang Wang updated KAFKA-3982:
---------------------------------
       Resolution: Fixed
    Fix Version/s: 0.11.0.0
           Status: Resolved  (was: Patch Available)

Issue resolved by pull request 1655
[https://github.com/apache/kafka/pull/1655]

> Issue with processing order of consumer properties in console consumer
> ----------------------------------------------------------------------
>
>                 Key: KAFKA-3982
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3982
>             Project: Kafka
>          Issue Type: Bug
>          Components: consumer
>            Reporter: Vahid Hashemian
>            Assignee: Vahid Hashemian
>            Priority: Minor
>             Fix For: 0.11.0.0
>
>
> With the recent introduction of {{consumer.property}} argument in console consumer, both new and old consumer could overwrite certain properties provided using this new argument.
> Specifically, the old consumer would overwrite the values provided for [{{auto.offset.reset}}|https://github.com/apache/kafka/blob/10bbffd75439e10fe9db6cf0aa48a7da7e386ef3/core/src/main/scala/kafka/tools/ConsoleConsumer.scala#L173] and [{{zookeeper.connect}}|https://github.com/apache/kafka/blob/10bbffd75439e10fe9db6cf0aa48a7da7e386ef3/core/src/main/scala/kafka/tools/ConsoleConsumer.scala#L174], and the new consumer would overwrite the values provided for [{{auto.offset.reset}}|https://github.com/apache/kafka/blob/10bbffd75439e10fe9db6cf0aa48a7da7e386ef3/core/src/main/scala/kafka/tools/ConsoleConsumer.scala#L196], [{{bootstrap.servers}}|https://github.com/apache/kafka/blob/10bbffd75439e10fe9db6cf0aa48a7da7e386ef3/core/src/main/scala/kafka/tools/ConsoleConsumer.scala#L197], [{{key.deserializer}}|https://github.com/apache/kafka/blob/10bbffd75439e10fe9db6cf0aa48a7da7e386ef3/core/src/main/scala/kafka/tools/ConsoleConsumer.scala#L198], and [{{key.deserializer}}|https://github.com/apache/kafka/blob/10bbffd75439e10fe9db6cf0aa48a7da7e386ef3/core/src/main/scala/kafka/tools/ConsoleConsumer.scala#L199].
> For example, running the old consumer as {{bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic foo --consumer-property auto.offset.reset=none}} the value that's eventually selected for {{auto.offset.reset}} will be {{largest}}, overwriting what the user provides in the command line.
> This seems to be because the properties provided via {{consumer.property}} argument are not considered when finalizing the configuration of the consumer.
> Some properties can now be provided in three different places (directly in the command line, via the {{consumer.property}} argument, and via the {{consumer.config}} argument, in the same order of precedence).



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