This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • KIP-243: Make ProducerConfig and ConsumerConfig constructors public
Skip to end of metadata
Go to start of metadata


Current stateAccepted

Discussion thread[VOTE] KIP-243: Make ProducerConfig and ConsumerConfig constructors public (no DISCUSS thread)


Released: 1.1.0

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).


Constructors of ProducerConfig and ConsumerConfig are not public at the moment. This makes it hard to access default values for configurations. For Kafka Streams, we need access to those default value sometime and are forces to hardcode them via "copy and paste". Making constructors public allows programmatic access without the danger to forget updating Streams code in case a producer or consumer default value changes. (Note, AdminConfig constructor is already public.)

Public Interfaces

This only affects ProducerConfig and ConsumerConfig

// old API
ProducerConfig(Map<?, ?> props);
ConsumerConfig(Map<?, ?> props);
// new API
public ProducerConfig(Properties props);
public ProducerConfig(Map<String, Object> props);
public ConsumerConfig(Properties props);
public ConsumerConfig(Map<String, Object> props);

Proposed Changes

We suggest to make both constructors public.

Compatibility, Deprecation, and Migration Plan

  • We only add new public methods, thus, there is no compatibility issue.

Test Plan

Existing tests have already access to the constructors and thus no new tests are required.

Rejected Alternatives



  • No labels