Skip to content

Latest commit

 

History

History
28 lines (14 loc) · 806 Bytes

README.md

File metadata and controls

28 lines (14 loc) · 806 Bytes
  1. Start Zookeeper Server

    sh bin/zookeeper-server-start.sh config/zookeeper.properties

  2. Start Kafka Server / Broker

    sh bin/kafka-server-start.sh config/server.properties

  3. Create topic

    sh bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic NewTopic --partitions 3 --replication-factor 1

  4. list out all topic names

    sh bin/kafka-topics.sh --bootstrap-server localhost:9092 --list

  5. Describe topics

    sh bin/kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic NewTopic

  6. Produce message

    sh bin/kafka-console-producer.sh --broker-list localhost:9092 --topic NewTopic

  7. Consume message

    sh bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic NewTopic --from-beginning