[
https://issues.apache.org/jira/browse/KAFKA-16656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17844368#comment-17844368
]
Chris Egerton commented on KAFKA-16656:
---------------------------------------
Hi [~leninjoseph] it should be possible to use a custom separator with the
{{DefaultReplicationPolicy}} class. What are the names of the topics you're
seeing cyclical replication for?
I've sketched out a unit test that can be added to the [ReplicationPolicyTest
suite|https://github.com/apache/kafka/blob/05df10449eb9c95fe6d6055b302c84686be8058d/connect/mirror-client/src/test/java/org/apache/kafka/connect/mirror/ReplicationPolicyTest.java]
that probes how the class handles custom separators and everything appears to
be working, but this doesn't rule out the possibility of bugs in other places:
{{@Test}}
{{public void testCustomSeparator() {}}
{{ DefaultReplicationPolicy policyWithCustomSeparator = new
DefaultReplicationPolicy();}}
{{ Map<String, Object> config = new HashMap<>();}}
{{ config.put(DefaultReplicationPolicy.SEPARATOR_CONFIG, "-");}}
{{ policyWithCustomSeparator.configure(config);}}
{{ assertEquals("source", policyWithCustomSeparator.topicSource("source-t"));}}
{{ assertEquals("t", policyWithCustomSeparator.upstreamTopic("source-t"));}}
{{}}}
> Using a custom replication.policy.separator with DefaultReplicationPolicy
> -------------------------------------------------------------------------
>
> Key: KAFKA-16656
> URL: https://issues.apache.org/jira/browse/KAFKA-16656
> Project: Kafka
> Issue Type: Bug
> Components: mirrormaker
> Affects Versions: 3.5.1
> Reporter: Lenin Joseph
> Priority: Major
>
> Hi,
> In the case of bidirectional replication using mm2, when we tried using a
> custom replication.policy.separator( ex: "-") with DefaultReplicationPolicy ,
> we see cyclic replication of topics. Could you confirm whether it's mandatory
> to use a CustomReplicationPolicy whenever we want to use a separator other
> than a "." ?
> Regards,
> Lenin
--
This message was sent by Atlassian Jira
(v8.20.10#820010)