Assignee: Nikolaos Christidis ([email protected])
- RabbitMQ
- PostgreSQL
In order to start the infrastructure, execute: docker-compose up
, you can see more info
at: docker-compose.yml file
-
booking-common-infra contains common infrastructure code, such as: DTOs, Errors, RabbitMQ queues and exchanges, etc.
-
booking-consumer contains the service code in order to consume messages from rabbit mq and store this info to the database (postgresql).
-
booking-domain contains the domain entities and repositories, that other modules use.
-
booking-producer contains the service code in order to expose rest endpoints, that provide validation on input and produce messages to rabbitmq.
-
data-injector contains code in order to produce traffic to the whole application-platform, such as create booking scenario, edit booking scenario, delete booking scenario.
-
e2e-tests uses the code from module: data-injector in order to test the functionality of the whole application-platform
- You need to have run infrastructure (rabbitmq and postgresql), producer and consumer services also.
cd data-injector/
and execute there:mvn clean install
cd e2e-tests/
mvn clean test
cd booking-domain/
mvn clean install
cd booking-common-infra
mvn clean install
cd booking-consumer/
mvn clean install
java -jar target/booking-consumer-1.0.0.jar
For consumption from RabbitMQ and saving to PostgreSQL I have applied Best-Effort 1PC(Phase Commit)
more info: https://www.infoworld.com/article/2077963/distributed-transactions-in-spring--with-and-without-xa.html
and consumption operations are idempotent @IdempotentOperation
cd booking-producer/
mvn clean install
java -jar target/booking-producer-1.0.0.jar
In order to create queues and exchanges automatically (via spring bootstrapping) you should start first this service (booking-producer)
TODO: re-fire messages from parking-lot-queue via a rest endpoint.