🖥️kafka-topics

➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the kafka-topics command with important options and switches using examples.

▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁

#  ██╗  ██╗ █████╗ ███████╗██╗  ██╗ █████╗    ████████╗ ██████╗ ██████╗ ██╗ ██████╗███████╗
#  ██║ ██╔╝██╔══██╗██╔════╝██║ ██╔╝██╔══██╗   ╚══██╔══╝██╔═══██╗██╔══██╗██║██╔════╝██╔════╝
#  █████╔╝ ███████║█████╗  █████╔╝ ███████║█████╗██║   ██║   ██║██████╔╝██║██║     ███████╗
#  ██╔═██╗ ██╔══██║██╔══╝  ██╔═██╗ ██╔══██║╚════╝██║   ██║   ██║██╔═══╝ ██║██║     ╚════██║
#  ██║  ██╗██║  ██║██║     ██║  ██╗██║  ██║      ██║   ╚██████╔╝██║     ██║╚██████╗███████║
#  ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝  ╚═╝╚═╝  ╚═╝      ╚═╝    ╚═════╝ ╚═╝     ╚═╝ ╚═════╝╚══════╝

# kafka-topics
#
# Comamnd-line tool to manage Kafka topics

# list topics
kafka-topics --zookeeper localhost:2181 --list

# create a topic
kafka-topics --zookeeper localhost:2181 --create --topic logs --partitions 3 --replication-factor 2

# view topic
kafka-topics --zookeeper localhost:2181 --describe --topic logs

# update a topic
kafka-topics --zookeeper localhost:2181 --alter --topic logs --config cleanup.policy=compact

# delete a topic
kafka-topics --zookeeper localhost:2181 --delete --topic logs
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░