0
0
Kafkadevops~10 mins

Geo-replication strategies in Kafka - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the replication factor for a Kafka topic.

Kafka
kafka-topics --create --topic my-topic --partitions 3 --replication-factor [1] --bootstrap-server localhost:9092
Drag options to blanks, or click blank then click option'
A3
B5
C0
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Setting replication factor to 0 disables replication and causes errors.
Using a replication factor higher than the number of brokers.
2fill in blank
medium

Complete the code to configure MirrorMaker 2 to replicate topics from source to target cluster.

Kafka
bin/kafka-mirror-maker.sh --consumer.config consumer.properties --producer.config producer.properties --whitelist [1]
Drag options to blanks, or click blank then click option'
Atarget.*
Btopic1,topic2
Csource.*
D.*
Attempts:
3 left
💡 Hint
Common Mistakes
Using a whitelist that does not match any topics.
Confusing whitelist with blacklist.
3fill in blank
hard

Fix the error in the MirrorMaker 2 configuration to enable active-active geo-replication.

Kafka
clusters = [1]
replication.policy.class = org.apache.kafka.connect.mirror.DefaultReplicationPolicy
Drag options to blanks, or click blank then click option'
Asource,target
Bsource
Csource;target
Dsource target
Attempts:
3 left
💡 Hint
Common Mistakes
Using semicolons or spaces instead of commas.
Listing only one cluster disables replication.
4fill in blank
hard

Fill both blanks to create a topic configuration that enables geo-replication with idempotent producer and exactly-once semantics.

Kafka
enable.idempotence=[1]
processing.guarantee=[2]
Drag options to blanks, or click blank then click option'
Atrue
Bfalse
Cexactly_once
Dat_least_once
Attempts:
3 left
💡 Hint
Common Mistakes
Disabling idempotence causes duplicate messages.
Using at_least_once processing guarantee loses exactly-once benefits.
5fill in blank
hard

Fill all three blanks to configure MirrorMaker 2 with source cluster alias, target cluster alias, and replication factor.

Kafka
clusters = [1]
source.cluster.alias = [2]
target.cluster.alias = [3]
Drag options to blanks, or click blank then click option'
Asource,target
Bus-east
Cus-west
Dsource;target
Attempts:
3 left
💡 Hint
Common Mistakes
Using semicolons instead of commas in clusters.
Mixing up source and target aliases.