Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/selimhorri/kafka-boot
kafka-producer-consumer-with-spring-boot
https://github.com/selimhorri/kafka-boot
java kafka kafka-consumer kafka-producer kafka-topic message-streaming spring-boot spring-kafka streaming-data
Last synced: about 1 month ago
JSON representation
kafka-producer-consumer-with-spring-boot
- Host: GitHub
- URL: https://github.com/selimhorri/kafka-boot
- Owner: SelimHorri
- Created: 2021-08-13T23:37:41.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-07T20:55:52.000Z (about 3 years ago)
- Last Synced: 2023-03-05T09:02:35.334Z (over 1 year ago)
- Topics: java, kafka, kafka-consumer, kafka-producer, kafka-topic, message-streaming, spring-boot, spring-kafka, streaming-data
- Language: Java
- Homepage:
- Size: 82 KB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# kafka-boot
## kafka-producer-consumer-with-spring-bootSimple Spring Boot app to consume the published message into a Kafka topic through a simple Rest API:
/messages/publish/{msg}
_ __ __ _ ______ _
| | / / / _|| | | ___ \ | |
| |/ / __ _ | |_ | | __ __ _ | |_/ / ___ ___ | |_
| \ / _` || _|| |/ / / _` || ___ \ / _ \ / _ \ | __|
| |\ \| (_| || | | < | (_| || |_/ /| (_) || (_) || |_
\_| \_/ \__,_||_| |_|\_\ \__,_|\____/ \___/ \___/ \__|
Supersonic Java with Spring Boot ☕️💚### Kafka producer
- Launch Zookeeper server
```shell
${KAFKA_HOME}/bin/zookeeper-server-start.sh ${KAFKA_HOME}/config/zookeeper.properties
```- Launch Kafka server
```shell
${KAFKA_HOME}/bin/kafka-server-start.sh ${KAFKA_HOME}/config/server.properties
```- Create new Topic called 'NewTopic'
```shell
${KAFKA_HOME}/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic NewTopic --from-beginning
```### Kafka consumer (optional)
- Launch a consumer message streamer
```shell
${KAFKA_HOME}/bin/kafka-console-producer --broker-list localhost:9092 --topic NewTopic
```