DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
Status
Current state: Under Discussion
Discussion thread: WIP
JIRA:
KAFKA-10043
-
Getting issue details...
STATUS
Motivation
Kafka allows users to configure its behavior through multiple methods:
- Command line arguments
- Configuration files
- Default values
However, there is no standardized or consistent approach for determining which source takes precedence when multiple are provided simultaneously. This inconsistency can cause user confusion and make the system more bug-prone. This KIP aims to establish a clear and uniform priority order for property loading.
Public Interfaces
The priority order for loading properties into Kafka configurations is as follows:
- Command line arguments
- Configuration files
- Default values
Command line arguments (if allowed) have the highest priority, and default values have the lowest.
Proposed Changes
Tools that can be configured through both command line arguments and configuration files should be adjusted accordingly.
The following tools will be updated:
- ConsumerPerformance, ShareConsumerPerformance, ProducerPerformance
- ConsoleConsumer, ConsoleProducer, ConsoleShareConsumer
Compatibility, Deprecation, and Migration Plan
Impact: Existing users who might have configured their settings based on the tools, which implementing their own loading order, rather than the priority proposed here, would be impacted.
Test Plan
Unit tests will be added to ensure that the properties are loaded according to the priority order as proposed.
Rejected Alternatives
1. Allow Each Tool to Have Its Own Property Loading Precedence
Reason for Rejection: While this would provide more flexibility for Kafka developers, it would introduce undesirable complexity to the configuration logic, be confusing to users, and increase the potential for bugs.
2. Preferring Configuration Files Over Command Line Arguments
Reason for Rejection: Intuitively, users are more likely to expect properties set via command line arguments to take effect over those defined in configuration files.