Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kofa-yoh/6.5-spring-boot-kafka-order-service
https://github.com/kofa-yoh/6.5-spring-boot-kafka-order-service
Last synced: about 9 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/kofa-yoh/6.5-spring-boot-kafka-order-service
- Owner: Kofa-Yoh
- Created: 2024-04-21T16:45:20.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-04-22T09:40:03.000Z (7 months ago)
- Last Synced: 2024-04-22T22:11:59.911Z (7 months ago)
- Language: Java
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kafka messages sending DEMO
There are 2 services:
- Order-service
- [Order-status-service](https://github.com/Kofa-Yoh/6.5-spring-boot-kafka-order-status-service) (will be starting via Docker)Steps:
1. User send POST-request with product (see [Endpoints](#endpoints)) in Order-service.
2. Order-service send message with POST-request's data in Kafka Brocker.
3. Order-status-service get this message from Kafka and send new message in Kafka.
4. Order-service get message from Order-status-service.## Quick start
1. Download project
```
git clone Kofa-Yoh/6.5-spring-boot-kafka-order-service
cd 6.5-spring-boot-kafka-order-service
```
2. Start Zookeeper, Kafka, Order-status-app services via Docker - in terminal
```
cd docker
.\docker-start.cmd
# or
.\docker-start.sh
```
3. Start main order-service project
```
./gradlew bootRun
```
4. After work - to stop services
```
# Stop Order-status-app service
Ctrl + C# Stop and delete containers, images, volumes
.\docker-stop.cmd
# or
.\docker-stop.sh
```## Endpoints
```
POST http://localhost:8080/api/v1/order/kafka/send
{
"product":"phone",
"quantity":"100"
}
```Tests
```
./gradlew test
```