Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/techprimers/spring-boot-kafka-producer-example
Spring Boot Kafka Producer Example
https://github.com/techprimers/spring-boot-kafka-producer-example
kafka-producer kafka-topic spring-kafka
Last synced: 1 day ago
JSON representation
Spring Boot Kafka Producer Example
- Host: GitHub
- URL: https://github.com/techprimers/spring-boot-kafka-producer-example
- Owner: TechPrimers
- Created: 2018-05-18T18:57:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-07-29T12:57:30.000Z (over 2 years ago)
- Last Synced: 2024-12-25T16:06:59.083Z (8 days ago)
- Topics: kafka-producer, kafka-topic, spring-kafka
- Language: Java
- Homepage:
- Size: 47.9 KB
- Stars: 131
- Watchers: 8
- Forks: 178
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Boot with Kafka Producer Example
This Project covers how to use Spring Boot with Spring Kafka to Publish JSON/String message to a Kafka topic
## Start Zookeeper
- `bin/zookeeper-server-start.sh config/zookeeper.properties`## Start Kafka Server
- `bin/kafka-server-start.sh config/server.properties`## Create Kafka Topic
- `bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic Kafka_Example`## Consume from the Kafka Topic via Console
- `bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic Kafka_Example --from-beginning`## Publish message via WebService
- `http://localhost:8081/kafka/publish/Sam`
- `http://localhost:8081/kafka/publish/Peter`