Skip to content

Deepali1999/kafka-docker-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

kafka-docker-setup

  • clone this repository
  • Move inside the cloned directory and execute below commands
docker compose up -d

  • Now once the container is up, use the following command to entre the kafka shell running inside the container.
  • docker exec -it -w /opt/kafka/bin broker sh
    
  • To Add a topic in Kafka,
./kafka-topics.sh --create --topic sample-topic --bootstrap-server broker:29092
  • To start consumer on a topic,
./kafka-console-consumer.sh --topic sample-topic --from-beginning --bootstrap-server broker:29092
  • To produce the data in the topic,
./kafka-console-producer.sh --topic sample-topic --bootstrap-server broker:29092
  • To see the details about your topic
./kafks-topics.sh --bootstrap-server broker:29092 --describe --topic sample-topic
  • To see the details about all topic
./kafks-topics.sh --bootstrap-server broker:29092 --describe 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors