-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkafka.txt
30 lines (23 loc) · 1.11 KB
/
kafka.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
zookeeper-server-start.sh config/zookeeper.properties
kafka-server-start.sh config/server.properties
kafka-topics.sh --create \
--zookeeper localhost:2181 \
--replication-factor 1 \
--partitions 1 \
--topic streams-plaintext-input
kafka-topics.sh --create \
--zookeeper localhost:2181 \
--replication-factor 1 \
--partitions 1 \
--topic streams-wordcount-output \
--config cleanup.policy=compact
kafka-run-class.sh org.apache.kafka.streams.examples.wordcount.WordCountDemo
(!!!!!Don't run this command as it will run automatically by run1.sh file)kafka-console-producer.sh --broker-list localhost:9092 --topic streams-plaintext-input < /home/afzal786/Desktop/file.txt
kafka-console-consumer.sh --bootstrap-server localhost:9092 \
--topic streams-wordcount-output \
--from-beginning \
--formatter kafka.tools.DefaultMessageFormatter \
--property print.key=true \
--property print.value=true \
--property key.deserializer=org.apache.kafka.common.serialization.StringDeserializer \
--property value.deserializer=org.apache.kafka.common.serialization.LongDeserializer