Installing Kafka on your machine

Installing kakfa on your local machine

To Install Kafka on Mac Manually, follow these steps:

Run ZooKeeper & Kafka

From the root folder of Apache Kafka, you can run ZooKeeper by executing the following command:

bin/zookeeper-server-start.sh config/zookeeper.properties
  • Now, open a new terminal window & run the following command from the root of Apache Kafka to start the Kafka environment:
bin/kafka-server-start.sh config/server.properties

Create topics

Now, open a new terminal window & run the following command from the root of Apache Kafka to start the Kafka environment:

bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic foobar

List topics

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

Delete topics

bin/kafka-topics.sh --bootstrap-server localhost:9092 --delete --topic  foobar