A reactive webhook application built with Spring Boot that allows you to receive, process, and manage webhooks.
This application provides a platform for handling webhooks in a reactive way, using Spring WebFlux and R2DBC for non-blocking database operations. It's designed to be scalable and efficient, making it suitable for high-throughput webhook processing.
- Java 21
- Spring Boot 3.5.0
- Spring WebFlux (Reactive Web)
- Spring Data R2DBC (Reactive Database Connectivity)
- PostgreSQL 15.5
- Consul 1.18.0 (Service Discovery)
- Spring Cloud LoadBalancer
- Docker & Docker Compose
- Java 21 or higher
- Maven 3.6 or higher
- Docker and Docker Compose
- Git
git clone https://github.com/GabryelBoeira/Spring_cloud_webflux.git
cd webhook-app
The application requires PostgreSQL and Consul, which can be started using Docker Compose:
docker-compose up -d
This will start:
- PostgreSQL on port 5432 with database name
webhookdb
(credentials: root/root) - Consul on port 8500 with UI accessible at http://localhost:8500
./mvnw clean install
./mvnw spring-boot:run
The application is configured to connect to a PostgreSQL database. The default configuration is:
- Database: webhookdb
- Username: root
- Password: root
- Host: localhost
- Port: 5432
You can modify these settings in the application.properties file or by setting environment variables.
The application uses Consul for service discovery. The Consul UI is accessible at http://localhost:8500.
To build a production-ready JAR file:
./mvnw clean package
The JAR file will be created in the target
directory.
Note: API documentation will be added as the application evolves.
The application can be configured through the application.properties
file or environment variables:
spring.application.name
: The name of the application (default: "webhook app")spring.r2dbc.url
: The R2DBC URL for database connectionspring.r2dbc.username
: Database usernamespring.r2dbc.password
: Database passwordspring.cloud.consul.host
: Consul hostspring.cloud.consul.port
: Consul port
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.