File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
apache-kafka-producer-demo Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Spring Boot with Kafka Producer Example
2
+
3
+ This Project covers how to use Spring Boot with Spring Kafka to Publish JSON/String message to a Kafka topic
4
+
5
+ ### Below are the command for Linux/Mac and Windows
6
+
7
+ ## Start Zookeeper
8
+ - ` bin/zookeeper-server-start.sh config/zookeeper.properties `
9
+ - ` .\bin\windows\zookeeper-server-start.bat config\zookeeper.properties `
10
+
11
+ ## Start Kafka Server
12
+ - ` bin/kafka-server-start.sh config/server.properties `
13
+ - ` .\bin\windows\kafka-server-start.sh config\server.properties `
14
+
15
+ ## Create Kafka Topic
16
+ - ` bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic Kafka_Example `
17
+ - ` .\bin\windows\kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic NewTopic `
18
+
19
+ ## Consume from the Kafka Topic via Console
20
+ - ` bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic Kafka_Example --from-beginning `
21
+ - ` .\bin\windows\kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic NewTopic --from-beginning `
You can’t perform that action at this time.
0 commit comments