Skip to content

Commit 9f54f59

Browse files
authored
Create README.md file
1 parent f5676e1 commit 9f54f59

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

apache-kafka-producer-demo/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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`

0 commit comments

Comments
 (0)