Basic Kafka Container commands


Basic Kafka Container commands

Basic Kafka Container commands
  • Create Topic with container
docker run \
  --net=host \
  --rm \
  confluentinc/cp-kafka:4.0.0 \
  kafka-topics --create --topic 
test_topic_name --partitions 3 --replication-factor 2 --if-not-exists --zookeeper  localhost:22181
  • List the popics with the container
docker run \
  --net=host \
  --rm \
  confluentinc/cp-kafka:4.0.0 \
  kafka-topics --list --zookeeper  localhost:22181
  • Delete Topic
docker run --net=host --rm confluentinc/cp-kafka:4.0.0 kafka-topics --zookeeper localhost:22181 --delete --topic test_topic_name

comments powered by Disqus