...
property | default value | description |
name | n/a | name of the connector, e.g. "us-west-mirror-maker" |
topics | ".*" | regex of topics to replicate, e.g. "topic1|topic2|topic3" |
topics.blacklist | [".*\.internal", ".*\.replica", "__consumer_offsets", …] | topics to exclude from replication |
source.cluster.alias | n/a | name of the cluster being replicated |
source.cluster.bootstrap.servers | n/a | upstream cluster to replicate |
target.cluster.bootstrap.servers | n/a | downstream cluster |
sync.topic.configs | true | whether or not to monitor source cluster for configuration changes |
sync.topic.acls | true | whether to monitor source cluster ACLs for changes |
admin.* | n/a | passed to AdminClient for local cluster |
remote.admin.* | n/a | passed to remote AdminClient |
emit.heartbeats | true | connector should periodically emit heartbeats |
emit.heartbeats.interval.seconds | 5 (seconds) | frequency of heartbeats |
emit.checkpoints | true | connector should periodically emit consumer offset information |
emit.checkpoints.interval.seconds | 5 (seconds) | frequency of checkpoints |
update.topics | true | connector should periodically check for new topics |
update.topics.interval.seconds | 5 (seconds) | frequency to check source cluster for new topics |
update.groups | true | connector should periodically check for new consumer groups |
update.groups.interval.seconds | 5 (seconds) | frequency to check source cluster for new consumer groups |
readahead.queue.capacity | 500 (records) | number of records to let consumer get ahead of producer |
...
Code Block |
---|
name=local-mirror-source topics=.* source.cluster.alias=upstream connector.class=org.apache.kafka.connect.mirror.KafkaSourceConnector tasks.max=1 # for demo, usesource localand Kafkatarget clusterclusters forare all producers, consumers the same source.cluster.alias=upstream source.cluster.bootstrap.servers=localhost:9092 target.cluster.bootstrap.servers=localhost:9092 # use ByteArrayConverter to ensure that records are not re-encoded key.converter=org.apache.kafka.connect.converters.ByteArrayConverter value.converter=org.apache.kafka.connect.converters.ByteArrayConverter |
This will enable enables running standalone MM2 nodes as follows:
...