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:14:00 UTC
[jira] [Created] (KAFKA-7700) AbstractConfig does not honor
Properties defaults
Tommy Becker created KAFKA-7700:
-----------------------------------
Summary: 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
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)