Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar
Contributor

This video provides the steps to configure Kafka Mirror Maker in Kerberized clusters.

Open YouTube video here

 

To run Kafka Mirror Maker using Kerberos clusters, do the following:

Environment:

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
* In this example, both environments are sharing same KDC and it was created on specific principal for the same.

Destination Files 

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>";
    };

Destination commands

  1. export KAFKA_OPTS="-Djava.security.auth.login.config=<path_to_kafka_mirrormaker_jaas.conf>"
  2. ./kafka-run-class.sh kafka.tools.MirrorMaker --consumer.config <path_To_Consumer.properties> 
    --producer.config <path_To_producer.properties> --whitelist "<MirrorMakertopicName>"

Number of consumption streams

Use the --num.streams option to specify the number of mirror consumer threads to create. 

Source commands

  1. ./kafka-console-producer.sh --broker-list <brokerSourceHost>:<brokerPort> 
    --topic <MirrorMakertopicName> --security-protocol PLAINTEXTSASL
  2. ./kafka-console-consumer.sh --bootstrap-server <brokerDestinationHost>:<brokerPort> 
    --topic <MirrorMakertopicName> --security-protocol PLAINTEXTSASL
1,834 Views
0 Kudos
Version history
Last update:
‎01-04-2021 04:27 AM
Updated by:
Rising Star Rising Star
Contributors