0
0
Kafkadevops~10 mins

Topic deletion and cleanup in Kafka - Interactive Code Practice

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

Complete the command to delete a Kafka topic named 'my-topic'.

Kafka
kafka-topics.sh --delete --topic [1] --bootstrap-server localhost:9092
Drag options to blanks, or click blank then click option'
Aremove-topic
Bmy-topic
Cdelete-topic
Dtopic-delete
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect topic names.
Confusing command options.
2fill in blank
medium

Complete the command to list all topics after deletion to verify removal.

Kafka
kafka-topics.sh --list --bootstrap-server [1]
Drag options to blanks, or click blank then click option'
Alocalhost:2181
Blocalhost:9093
Clocalhost:9092
Dlocalhost:8080
Attempts:
3 left
💡 Hint
Common Mistakes
Using ZooKeeper port instead of Kafka broker port.
Using wrong port numbers.
3fill in blank
hard

Fix the error in the command to enable topic deletion in Kafka server properties.

Kafka
delete.topic.enable=[1]
Drag options to blanks, or click blank then click option'
Atrue
Bfalse
Cenabled
Dyes
Attempts:
3 left
💡 Hint
Common Mistakes
Setting the property to false or other invalid values.
Not restarting the Kafka server after change.
4fill in blank
hard

Fill both blanks to create a cleanup policy that deletes old log segments automatically.

Kafka
log.cleanup.policy=[1]
log.retention.hours=[2]
Drag options to blanks, or click blank then click option'
Adelete
Bcompact
C168
D720
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'compact' instead of 'delete' for cleanup policy.
Setting retention hours too low or too high without reason.
5fill in blank
hard

Fill all three blanks to create a command that deletes a topic and waits for cleanup to complete.

Kafka
kafka-topics.sh --delete --topic [1] --bootstrap-server [2] && kafka-run-class kafka.tools.GetOffsetShell --broker-list [3] --topic [1]
Drag options to blanks, or click blank then click option'
Amy-topic
Blocalhost:9092
Dlocalhost:2181
Attempts:
3 left
💡 Hint
Common Mistakes
Using ZooKeeper port 2181 instead of broker port 9092.
Mismatching topic names.