Created on 12-10-2019 03:34 AM - edited on 01-04-2021 04:27 AM by K23
This video provides the steps to configure Kafka Mirror Maker in Kerberized clusters.
Open YouTube video here
Cluster A (Source-Kerberized):
c189-node2.squadron-labs.com Broker1 c189-node3.squadron-labs.com Broker2 c189-node4.squadron-labs.com Broker3
Cluster B (Destination-Kerberized):
c289-node2.squadron-labs.com Broker1 c289-node3.squadron-labs.com Broker2 c289-node4.squadron-labs.com Broker3
consumer.properties bootstrap.servers=<brokerSourceHost>:<brokerPort>,<brokerSourceHost>:<brokerPort> group.id=<consumerGroupName> security.protocol=PLAINTEXTSASL
producer.properties bootstrap.servers=<brokerDestinationHost>:<brokerPort>,<brokerDestinationHost>:<brokerPort> key.serializer=org.apache.kafka.common.serialization.ByteArraySerializer value.serializer=org.apache.kafka.common.serialization.ByteArraySerializer security.protocol=PLAINTEXTSASL
kafka_mirrormaker_jaas.conf KafkaClient { com.sun.security.auth.module.Krb5LoginModule required useKeyTab=true keyTab="<pathTokeytab>" storeKey=true useTicketCache=false serviceName="kafka" principal="<principal>@<REALM>"; };
export KAFKA_OPTS="-Djava.security.auth.login.config=<path_to_kafka_mirrormaker_jaas.conf>"
./kafka-run-class.sh kafka.tools.MirrorMaker --consumer.config <path_To_Consumer.properties> --producer.config <path_To_producer.properties> --whitelist "<MirrorMakertopicName>"
Use the --num.streams option to specify the number of mirror consumer threads to create. Source commands
./kafka-console-producer.sh --broker-list <brokerSourceHost>:<brokerPort> --topic <MirrorMakertopicName> --security-protocol PLAINTEXTSASL
./kafka-console-consumer.sh --bootstrap-server <brokerDestinationHost>:<brokerPort> --topic <MirrorMakertopicName> --security-protocol PLAINTEXTSASL