You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

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 order of precedence for loading properties into Kafka configurations is as follows:

  1. Command line arguments
  2. Configuration files
  3. 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:

  • ConsoleConsumer, ConsoleProducer, ConsoleShareConsumer
  • ConsumerPerformance, ShareConsumerPerformance, ProducerPerformance

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 precedence over those defined in configuration files.



  • No labels