kafka mirrormaker只建立主题

时间:2019-01-24 07:19:50

标签: apache-kafka

我运行命令:

"JAVA_HOME=./jdk ./origin/bin/kafka-run-class.sh kafka.tools.MirrorMaker --whitelist ".*" --consumer.config config/consumer_mirror.properties --producer.config config/producer_mirror.properties"

创建一个镜像,但是它只复制主题名称,不复制数据

消费者财产文件的内容为

zookeeper.connect=10.40.80.61:2181

# timeout in ms for connecting to zookeeper
zookeeper.connection.timeout.ms=1000000

#consumer group id
group.id=mirror-maker-group1

#consumer timeout
#consumer.timeout.ms=5000

mirror.topics.whitelist=*
client.id=mirror_maker_consumer1

生产者属性文件的内容为

metadata.broker.list=localhost:9092

# name of the partitioner class for partitioning events; default partition spreads data randomly
#partitioner.class=

# specifies whether the messages are sent asynchronously (async) or synchronously (sync)
producer.type=async

# specify the compression codec for all data generated: none , gzip, snappy.
# the old config values work as well: 0, 1, 2 for none, gzip, snappy, respectivally
compression.codec=none

# message encoder
serializer.class=kafka.serializer.DefaultEncoder
client.id=mirror_maker_producer

0 个答案:

没有答案