Skip to content

alicanli1995/event-driven-microservices-cqrs-event-sourcing-saga-axon-server

Repository files navigation

Event-driven Microservices, CQRS, Event Sourcing, SAGA, Transactions Management by AXON SERVER

Introduction

This is a sample project that shows how to implement a simple event-driven microservice architecture using .NET Core, CQRS, Event Sourcing, SAGA, Transactions, Sagas, CQRS and Event Sourcing.

Architecture

ci

Project Properties

  • CORE - API ->

    • General axon configuration classes
    • General shared command and event classes for all microservices
  • Order Service ->

    • Management all saga orchestration
    • Management if any error occurs in the saga orchestration compensating the transaction
    • Management all command and event classes for order service
  • Product Service ->

    • Management of products command and query handlers
  • Customer Service ->

    • Management of customers command and query handlers

Technologies

  • Java 17
  • Spring Boot 2.7.5
  • Spring Cloud 2021.0.3
  • Axon Server 4.6.2
  • Spring Cloud
  • Spring Data JPA
  • H2 Database
  • Lombok
  • Docker Compose
  • Eureka Server

Project Structure

  • core-api - Contains the core api of the project
  • api-gateway - Contains the api gateway of the project
  • registry-server - Contains the eureka server of the project
  • order-service - Contains the order service of the project and management the saga orchestration
  • payment-service - Contains the payment service of the project
  • product-service - Contains the product service of the project
  • user-service - Contains the customer service of the project

How to run

  • First run axon server
cd infrastructure
docker-compose up -d
  • Run the registry server
cd registry-server
mvn spring-boot:run
  • Run the api gateway
cd api-gateway
mvn spring-boot:run
  • Run the order service
cd order-service
mvn spring-boot:run
  • Run the payment service
cd payment-service
mvn spring-boot:run
  • Run the product service
cd product-service
mvn spring-boot:run
  • Run the user service
cd user-service
mvn spring-boot:run

About

Event-driven Microservices, CQRS, Event Sourcing, SAGA, Transactions Management by AXON SERVER

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy