Last active
April 1, 2021 19:53
-
-
Save sshaaf/aeb9a19ae66e8b53b91595c336cf721e to your computer and use it in GitHub Desktop.
Setting up Kafka and..
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# starting the server | |
kafka_2.12-2.1.1> bin/zookeeper-server-start.sh config/zookeeper.properties | |
kafka_2.12-2.1.1> bin/kafka-server-start.sh config/server.properties | |
# Adding topics | |
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic topic-mission-event | |
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic topic-mission-command | |
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic topic-responder-location-update | |
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic topic-incident-event | |
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic topic-incident-command | |
# Listening to topics on cmd | |
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topic-responder-loc-event --from-beginning | |
# Writing to topics from cmd | |
bin/kafka-console-producer.sh --broker-list localhost:9092 --topic topic-mission-command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment