Providing a mirror kafka kafka-mirror-maker.sh operating tool for synchronizing data in a cluster to cluster to another.
Nature kafka mirroring tool is a consumer, theme consumption data from source cluster to be migrated, and then create a producer, consumer pull from the source to the cluster of data written to the target clusters.
The host is host1 write the data kafka environment theme called "test-mirror" to the host is host2 environment:
1): First create consumer and producer respectively startup configuration file in the source cluster:
Consumer profiles mirror-consumer.properties:
= host1 bootstrap.servers: 9092 # source refers to a cluster of proxy address group.id = Mirror # Consumer group name
Producer Profiles mirror-producer.properties:
= host2 bootstrap.servers: 9092 # refers to the target cluster proxy address
2): Running mirroring tool:
kafka-mirror-maker.sh --consumer.config ../config/mirror-consumer.properties --producer.config ../config/mirror-producer.properties --whitelist test-mirror
--Whitelist parameter specifies the topic you want to copy, to support regular;
--Blacklist parameter specifies the theme does not need to copy;