Status
Current state: Under Discussion
Discussion thread: here
JIRA: here
Motivation
Since KIP-690: Add additional configuration to control MirrorMaker 2 internal topics naming convention , the replication.policy.separator
has been used to control the name of internal topics for DefaultReplicationPolicy
, causing backward compatibility issues if users set a customized replication.policy.separator
. This impacted 3.1, 3.2, 3.3, 3.4, 3.5 versions.
Currently, the only way to work around this is either by providing a new version of ReplicationPolicy (which can optionally subclass the DefaultReplicationPolicy class) that overrides the ReplicationPolicy.offsetSyncsTopic and ReplicationPolicy.checkpointsTopic methods to use old topics if users still want to use the old internal topics, or by deleting the old internal topics and letting MM2 set up the new ones.
In this KIP, we are proposing to add replication.policy.internal.topic.separator.enabled
to allow customers to control this using configurations instead of providing a new implementation.
Public Interfaces
Property | Default value | Description |
---|---|---|
replication.policy.internal.topic.separator.enabled | false | whether or not to use replication.policy.separator to control internal topic names |
Proposed Changes
public class DefaultReplicationPolicy implements ReplicationPolicy, Configurable { private Boolean isInternalTopicSepratorEnabled; @Override public void configure(Map<String, ?> props) { if (props.containsKey(INTERNAL_TOPIC_SEPRATOR_ENABLED_CONFIG)) { isInternalTopicSepratorEnabled = (Boolean) props.get(INTERNAL_TOPIC_SEPRATOR_ENABLED_CONFIG); } } private String internalSuffix() { return isInternalTopicSepratorEnabled ? separator + "internal" : ".internal"; } }
Compatibility, Deprecation, and Migration Plan
Users who already use MM2 from Kafka 3.1, 3.2, 3.3, 3.4, 3.5 and wish to keep controlling internal topics using the separator will need to set `replication.policy.internal.topic.separator.enabled` to true.