This project demonstrates reactive file processing using both Spring Boot (JDK 17) and Quarkus, with the same domain logic implemented in two separate microservices. It is designed to:
- Read large text files line-by-line in a non-blocking way
- Transform the line by appending the sum of comma-separated values
- Store original data in PostgreSQL using JPA
- Publish transformed lines to MQTT topic
- Write a summary record via raw JDBC after file processing
- Write the output (from MQTT) to another file reactively
project-root/ ├── reader-springboot/ # Spring Boot microservice for reading & publishing ├── writer-springboot/ # Spring Boot microservice for subscribing & writing ├── reader-quarkus/ # Quarkus-based equivalent of reader-springboot ├── writer-quarkus/ # Quarkus-based equivalent of writer-springboot ├── .vscode/ # VS Code settings for project development | Component | Technology |
|---|---|
| Language | Java 17 |
| Build Tool | Maven |
| Frameworks | Spring Boot, Quarkus |
| Reactive Lib | Project Reactor (Spring) |
| Messaging | MQTT (Mosquitto) |
| Database | PostgreSQL 15 |
| JPA | Hibernate (Spring) / Panache |
| JDBC Summary | Spring JDBC Template / Java SQL |
| Containerization | Docker |
These are run separately via Docker Compose (outside the project):
- PostgreSQL (15)
- Mosquitto MQTT Broker
Your .env and docker-compose files should already define these.
Each microservice connects to external services via:
application.ymlorapplication.properties- Uses Spring/Quarkus environment loading
.envfiles can be used in Docker Compose context
# Navigate to reader-springboot cd reader-springboot # Build mvn clean package # Run (with input file path) java -jar target/reader-springboot.jar --file=input/data.txtOr via Docker:
docker-compose -f ../docker-compose.reader-springboot.yaml up📖 Resources
Reactive File Processing with MQTT: Spring Boot vs Quarkus Series
Spring Boot. Quarkus. Mutiny. Project Reactor. Reactive Streams. MQTT. Microservices
This project is licensed under the MIT License – free to use for learning and educational purposes.