Having configured mirrormaker 2 in an active/active state across two regions with a 2 clusters in each region. Producers write to the local origin topics in each of the clusters, these topics are successfully replicated to the other clusters as target topics.
Scenario 1: If the consumers are setup to read all the topics - local and remote on a cluster, then a message written to say orgin topic1 in cluster 1 is consumed locally and when copied over to cluster2 remote topic1 then a consumer on that cluster will also consume it and hence the message has been consumed twice. What is the best practice to handle this situation.
Scenario1: If the consumer reads only from local origin topic1 on each cluster then the duplicate reads are avoided, but if one of the clusters fail, then the load balancer will redirect the producer to another cluster.
So the two producers will now be writting to the orgin local topic1 or does the redirected producer write the remote topic 1 of the failed cluster and a new consumer instance reads from that ?