Skip to content

Instantly share code, notes, and snippets.

@gargashwani
Forked from piyushgarg-dev/README.md
Created May 18, 2024 03:56
Show Gist options
  • Select an option

  • Save gargashwani/e13821e6fa2a23be45fcb8d40216baa8 to your computer and use it in GitHub Desktop.

Select an option

Save gargashwani/e13821e6fa2a23be45fcb8d40216baa8 to your computer and use it in GitHub Desktop.
Kafka Crash Course

Kafka

Prerequisite

Commands

  • Start Zookeper Container and expose PORT 2181.
docker run -p 2181:2181 zookeeper
  • Start Kafka Container, expose PORT 9092 and setup ENV variables.
docker run -p 9092:9092 \
-e KAFKA_ZOOKEEPER_CONNECT=<PRIVATE_IP>:2181 \
-e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://<PRIVATE_IP>:9092 \
-e KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 \
confluentinc/cp-kafka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment