Skip to content

kafka using kafkajs - zookeeper and kafka set up locally.

Notifications You must be signed in to change notification settings

govindmurthi21/kafka

Repository files navigation

Basic kafka setup.

Install homebrew. https://brew.sh/

Then brew install docker

Then goto https://docs.docker.com/docker-for-mac/install/ and install the app.

Open terminal and ensure docker is up and running docker run hello-world

Verify in docker desktop

Start local zookeeper

docker run --name zookeeper -h localhost -p 2181:2181 zookeeper

Verify in docker desktop

Start local kafka

docker run -p 9092:9092 --name kafka -e KAFKA_ZOOKEEPER_CONNECT=yourlocalip:2181 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://yourlocalip:9092 -e KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 -d confluentinc/cp-kafka

Verify in docker desktop.

Clone repo and run topic.js, then producer and then consumer.

About

kafka using kafkajs - zookeeper and kafka set up locally.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published