question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I replicate connect-config, connect-offsets, connect-status topics using Mirror Maker 2 from prod kafka to backup?

See original GitHub issue

I have 2 clusters of kafka, one prod, the second cluster is exactly empty. I need to organize this cluster. I am using Mirror Maker 2, which I run through the strimzi operator. My config looks like this. With this configuration, I get to back up the topics jdbc_source_ums_user, _schemas. Could you help me?

apiVersion: kafka.strimzi.io/v1alpha1
kind: KafkaMirrorMaker2
metadata:
  name: my-mirror-maker2
spec:
  version: 2.5.0
  connectCluster: "backup-kafka-target"
  replicas: 1
  clusters:
  - alias: "prod-kafka-source"
    bootstrapServers: prod1:9092,prod2:9092,prod3:9092
  - alias: "backup-kafka-target"
    bootstrapServers: backup:9092
  mirrors:
  - sourceCluster: "prod-kafka-source"
    targetCluster: "backup-kafka-target"
    sourceConnector:
      tasksMax: 5
      config:
        replication.factor: 3
        offset-syncs.topic.replication.factor: 3
        sync.topic.acls.enabled: "false"
        sync.topic.configs.enabled: "true"
    heartbeatConnector:
      config:
        heartbeats.topic.replication.factor: 3
    checkpointConnector:
      config:
        checkpoints.topic.replication.factor: 3
    topics: "__test1-connect-config,__test1-connect-offsets,__test1-connect-status,__test2-connect-config,__test2-connect-offsets,__test2-connect-status,jdbc_source_ums_user,_schemas"
    topicsBlacklistPattern: .*[\-\.]internal, .*\.replica
    groupsBlacklistPattern: console-consumer-.*, connect-.*
    groups: ".*" 

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
scholzjcommented, Sep 23, 2020

I don’t really know. I’m not sure why they should have a special treatment. I think it might be worth if you try if it would work fine without the __. Maybe you need to escape them or enable the __ topics somewhere.

@ajborley Any idea what the problem might be?

0reactions
IlyaNakhaichukcommented, Sep 28, 2020

But when configuring KafkaMirrorMaker2, there are topicsBlacklistPattern and groupsBlacklistPattern fields, where I could just exclude internal topics in case I didn’t need to replicate them, and in fact, this field does not work for internal topics. But thanks for the help, I tried to rebuild the class indicated by ajborley and replication worked for me, but not through strimzi, but the command line.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to migrate consumer offsets using MirrorMaker 2.0?
0, I am using MirroMaker 2.0 as a Kafka-connect connector to replicate all the topics from the primary Kafka cluster to the backup...
Read more >
Kafka Properties in CDH 7.2.0 | CDP Public Cloud
Description: Default replication factor of Kafka Connect's config storage topic; Related Name: config.storage.replication.factor; Default Value: 1 ...
Read more >
Understanding Red Hat AMQ Streams components for ...
Begin by creating the Kafka Connect config amq-kafka-connect.yml . ... Figure 8: Replicating multiple data centers with Kafka Mirror Maker.
Read more >
Using Strimzi
Kafka (including ZooKeeper, Entity Operator, Kafka Exporter, and Cruise Control). Kafka Connect. Kafka MirrorMaker. Kafka Bridge. Custom resources are used to ...
Read more >
Kafka MirrorMaker 2.0 duplicate each messages
Kafka MirrorMaker 2.0 duplicate each messages I am trying to replicate Kafka cluster with anycodings_apache-kafka-con ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found