Table of Contents |
---|
Status
Current state: "Under Discussion"Accepted" (v1.2.0)
Discussion thread: No discussion thread: Vote for KIP-245: Use Properties instead of StreamsConfig in KafkaStreams constructor
JIRA: here
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
...
Because StreamsConfig is immutable and is created from a Properties object itself, the constructors accepting StreamsConfig are not useful and adds only boiler plate code. Thus, we should deprecate those constructors in order to remove them eventually.
Public Interfaces
Proposed Changes
Code Block | ||
---|---|---|
| ||
// Old API (using StreamsConfig)
public KafkaStreams(final Topology, final StreamsConfig config)
public KafkaStreams(final Topology, final StreamsConfig config, final KafkaClientSupplier clientSupplier)
public KafkaStreams(final Topology, final StreamsConfig config, final Time time)
// New API (using Properties)
public KafkaStreams(final Topology, final Properties props)
public KafkaStreams(final Topology, final Properties props, final KafkaClientSupplier clientSupplier)
public KafkaStreams(final Topology, final Properties props, final Time time)
public KafkaStreams(final Topology, final Properties props, final KafkaClientSupplier clientSupplier, final Time time)
|
Proposed Changes
We suggest to deprecate all the constructors using StreamsConfig, and use java.util.Properties insteadDescribe the new thing you want to do in appropriate detail. This may be fairly extensive and have large subsections of its own. Or it may be a few sentences. Use judgement based on the scope of the change.
Compatibility, Deprecation, and Migration Plan
- What impact (if any) will there be on existing users?
- If we are changing behavior how will we phase out the older behavior?
- If we need special migration tools, describe them here.
- When will we remove the existing behavior?
Rejected Alternatives
We are not removing any existing API, so this change should be backward compatible. All new APIs are straightforward which don't require excessive comments.
Rejected Alternatives
Not applicableIf there are alternative ways of accomplishing the same thing, what were they? The purpose of this section is to motivate why the design is the way it is and not some other way.