forked from team-data-science/document-streaming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKafka Commands.txt
23 lines (16 loc) · 873 Bytes
/
Kafka Commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
./kafka-topics.sh --list --bootstrap-server localhost:9092
## Create Topic
./kafka-topics.sh --create --topic ingestion-topic --bootstrap-server localhost:9092
./kafka-topics.sh --create --topic spark-output --bootstrap-server localhost:9092
# Local consumer
./kafka-console-consumer.sh --topic ingestion-topic --bootstrap-server localhost:9092
./kafka-console-consumer.sh --topic spark-output --bootstrap-server localhost:9092
# Local producer
./kafka-console-producer.sh --topic ingestion-topic --bootstrap-server localhost:9092
# To test if your Kafka is running correctly:
1. Connect to the container cli and go to the Kafka directory
2. Start a local consumer
3. Connect with a second cli to the container
4. Start in the second cli a local producer
5. Type in to the producer cli a message and hit enter
6. Check if you can see the message in the consumer cli