0
votes

My source cluster has a set of topics to which data is being published. I have these topic names specified in the mirrormaker properties file. I have not created the topics in the target cluster. My assumption is that MM 2.0 will automatically create these topics in the target cluster if they don't exist. But when I try to consume from the topic in the target cluster, I see the following message -

[2020-06-11 21:45:19,301] WARN [Consumer clientId=consumer-console-consumer-78249-1, groupId=console-consumer-78249] Error while fetching metadata with correlation id 4790 : {topic1=UNKNOWN_TOPIC_OR_PARTITION} (org.apache.kafka.clients.NetworkClient)

Does it mean the topics and partitions need to be created beforehand in the target cluster?

2

2 Answers

0
votes

I was looking at the topic with the same name as in the source topic but the topic name in the target cluster is .topic1.

0
votes

No, MM 2.0 takes responsibility to create a replicated topic in the target cluster. The topic name in the target cluster will be sourceAlias..

Refer this for more details: https://cwiki.apache.org/confluence/display/KAFKA/KIP-382%3A+MirrorMaker+2.0#KIP382:MirrorMaker2.0-Config,ACLSync