4b1bf0962d76780b08f22b4b99a6494e21993f71
This projects helps to build and deploy a microservice by applying DDD, CQRS, Event Souring principles on AXON JVM stack.
What you'll build
You'll build a sample microservice with one bounded context.What you'll need
AXON stack - framework and serverJava
SpringBoot
Postgres
Learn more about AXON stack
AXON is a open source stack to develop java based microservices . https://axoniq.io
package structure
This stack requires you to architect/structure your code is a particular way.api
This is where the core APIs live. APIs are exposed as command and queries which a client can use to interact with the system. This package also contains the Domain Events leveraged by commands and queriescommand
This package contains model which serves the command side of application. These model serves the commands only.query
This package contains model which serves the query side of application. These model serves the queries only.client
This package contains a domain service for test purposes.set up
For this DEMO, I am using the Event store which comes as part of AXON stack.
- spin up the docker container instance of AXON server : docker run -it --rm --name axonserver -p 8024:8024 -p 8124:8124 axoniq/axonserver
Check AXON dasboard : http://localhost:8024/
- spin up the docker container instance of postgres : docker run -it --rm --name postgres -p 5432:5432 -e POSTGRES_USER=planmatch -e POSTGRES_PASSWORD=secret postgres:9.6
run application
Run this springboot app from PlanMatchService.
verify
Summary
Congratulations on spinning up your microservices with AXON stack.
Description
Microservice developed by applying DDD, CQRS, Event Sourcing by using AXON, Java, Spring boot. The communication between command and query models is totally decoupled and mediated by buses handled by AXON server. Aggregate is managed as event sourced way
Languages
Java
100%