You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Tommy Becker (JIRA)" <ji...@apache.org> on 2018/12/03 18:18:00 UTC

[jira] [Commented] (KAFKA-7700) AbstractConfig does not honor Properties defaults

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

Tommy Becker commented on KAFKA-7700:
-------------------------------------

One option here would be to deprecate the use of {{Properties}} for configuration these classes, though such an approach would require a KIP. Alternatively we could probably add support for defaults in {{AbstractConfig}}.

> AbstractConfig does not honor Properties defaults
> -------------------------------------------------
>
>                 Key: KAFKA-7700
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7700
>             Project: Kafka
>          Issue Type: Bug
>          Components: config
>    Affects Versions: 2.1.0
>            Reporter: Tommy Becker
>            Assignee: Tommy Becker
>            Priority: Minor
>
> Kafka clients such as the Consumer and Producer require various configuration parameters to work. In the case of the Consumer and Producer, these parameters are provided by passing either a {{Map<String, ?>}} or {{Properties}} instance to the respective constructor.
> {{Properties}} is a legacy class (akin to {{Vector)}} that adds no value above {{Map<String, ?>}} other than the ability to wrap another {{Properties}} instance that provides defaults. But Kafka negates this benefit by treating the {{Properties}} instance as a {{Map}}, which only works due to an unfortunate decision to have {{Properties}} extend {{Hashtable}}.  Such treatment bypasses the defaults because they are only consulted by {{Properties.getProperty()}}. The net result is that when creating Kafka clients via {{Properties}}, any configuration from its defaults is ignored.
> This has been reported several times over the years as KAFKA-1909, KAFKA-2184, KAFKA-3049, and KAFKA-5514. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)