All Projects → mploed → Event Driven Spring Boot

mploed / Event Driven Spring Boot

Licence: apache-2.0
Example Application to demo various flavours of handling domain events in Spring Boot

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Event Driven Spring Boot

Retrofit Spring Boot Starter
A springboot starter for retrofit, and supports many functional feature enhancements, greatly simplifying development.(实现了Retrofit与spring-boot框架快速整合,并支持了诸多功能增强,极大简化开发)
Stars: ✭ 658 (+239.18%)
Mutual labels:  rest-api, spring-boot, spring
Springboard
Spring Boot based production grade starter kit.
Stars: ✭ 59 (-69.59%)
Mutual labels:  spring-data-jpa, spring-boot, spring
Spring Boot Examples
about learning Spring Boot via examples. Spring Boot 教程、技术栈示例代码,快速简单上手教程。
Stars: ✭ 26,812 (+13720.62%)
Mutual labels:  spring-data-jpa, spring-boot, spring
Springboot Starterkit
Starter Kit for Spring Boot based (REST APIs and WebMVC) micro services.
Stars: ✭ 596 (+207.22%)
Mutual labels:  spring-data-jpa, spring-boot, spring
Spring Boot Blog
Simple blog web app made using Spring Boot + Thymeleaf
Stars: ✭ 121 (-37.63%)
Mutual labels:  spring-data-jpa, spring-boot, spring
Microservices Event Sourcing
Microservices Event Sourcing 是一个微服务架构的在线购物网站,使用Spring Boot、Spring Cloud、Spring Reactor、OAuth2、CQRS 构建,实现了基于Event Sourcing的最终一致性,提供了构建端到端微服务的最佳实践
Stars: ✭ 657 (+238.66%)
Mutual labels:  event-sourcing, event-driven, spring-boot
Market
Simple web-market: Spring, JSP, REST, Hibernate (under modernization)
Stars: ✭ 47 (-75.77%)
Mutual labels:  rest-api, spring-data-jpa, spring-boot
Run Aspnetcore Microservices
Microservices on .Net platforms which used Asp.Net Web API, Docker, RabbitMQ, MassTransit, Grpc, Ocelot API Gateway, MongoDB, Redis, PostgreSQL, SqlServer, Dapper, Entity Framework Core, CQRS and Clean Architecture implementation. Also includes Cross-Cutting concerns like Implementing Centralized Distributed Logging with Elasticsearch, Kibana and SeriLog, use the HealthChecks with Watchdog, Implement Retry and Circuit Breaker patterns with Polly and so on.. See Microservices Architecture and Step by Step Implementation on .NET Course w/ discount->
Stars: ✭ 406 (+109.28%)
Mutual labels:  rest-api, event-sourcing, event-driven
Spring Cloud Flycloud
🔥🔥🔥FlyClould 微服务实战项目框架,在该框架中,包括了用 Spring Cloud 构建微服务的一系列基本组件和框架,对于后台服务框架的搭建有很大的参考价值,大家可以参考甚至稍加修改可以直接应用于自己的实际的项目开发中,该项目没有采用Maven进行项目构建,Maven通过xml进行依赖管理,导致整个配置文件太过臃肿,另外灵活性也不是很强,所以我采用Gradle进行项目构建和依赖管理,在FlyTour项目中我们见证了Gradle的强大,通过简单的一些配置就可以轻松的实现组件化的功能。该项目共有11个Module工程。其中10个位微服务工程,这10个微服务工程构成了一个完整的微服务系统,微服务系统包含了8个基础服务,提供了一整套微服务治理功能,他们分别是配置中心module_c…
Stars: ✭ 1,514 (+680.41%)
Mutual labels:  spring-data-jpa, spring-boot, spring
Spring Boot Shopping Cart
Simple shopping cart web app made using Spring Boot + Thymeleaf
Stars: ✭ 85 (-56.19%)
Mutual labels:  spring-data-jpa, spring-boot, spring
Cerberus
A demonstration of a completely stateless and RESTful token-based authorization system using JSON Web Tokens (JWT) and Spring Security.
Stars: ✭ 482 (+148.45%)
Mutual labels:  rest-api, spring-boot, spring
Javadevjournal
Source code for the tutorials published on the Javadevjournal site.
Stars: ✭ 141 (-27.32%)
Mutual labels:  rest-api, spring-data-jpa, spring-boot
All Things Cqrs
Comprehensive guide to a couple of possible ways of synchronizing two states with Spring tools. Synchronization is shown by separating command and queries in a simple CQRS application.
Stars: ✭ 474 (+144.33%)
Mutual labels:  events, spring-boot, spring
Event Sourcing Microservices Example
Learn about building microservices with event sourcing using Spring Boot and how to deploy a social network to Kubernetes using Docker Compose or Helm.
Stars: ✭ 167 (-13.92%)
Mutual labels:  event-sourcing, event-driven, spring-boot
Favorites Web
云收藏 Spring Boot 2.X 开源项目
Stars: ✭ 4,485 (+2211.86%)
Mutual labels:  spring-data-jpa, spring-boot, spring
Spring Mvc Thymeleaf Crud
Spring MVC CRUD Application with Thymeleaf, HTML5, CSS3 and Bootstrap
Stars: ✭ 14 (-92.78%)
Mutual labels:  spring-data-jpa, spring-boot, spring
Micro Company
Rest-full, Hipermedia-based distributed application. Spring boot & cloud. Angular. CQRS. Eventsourcing. Axonframework. Microservices. Docker. CloudFoundry
Stars: ✭ 307 (+58.25%)
Mutual labels:  event-sourcing, spring-boot, spring
Angularjs Springmvc Sample Boot
A RESTful sample using Spring Boot, Spring MVC, Spring Data and Angular/Bootstrap.
Stars: ✭ 309 (+59.28%)
Mutual labels:  spring-data-jpa, spring-boot, spring
Spring Boot Mongodb Angular Todo App
A Sample App built using Spring Boot, Angular and MongoDB
Stars: ✭ 84 (-56.7%)
Mutual labels:  rest-api, spring-boot, spring
Gemini
Model Driven REST framework to automatically generate CRUD APIs
Stars: ✭ 138 (-28.87%)
Mutual labels:  rest-api, spring-boot, spring

Event Driven Applications with Spring Boot

This projects tries to capture various options you have when dealing with Event Driven Spring Boot applications. The follwing Spring Technologies are being used:

  • Spring Boot
  • Spring Cloud Stream Rabbit
  • Spring Data JPA

These examples contain various different ways to model and deal with events:

  • Complete aggregates / entities in the events
  • REST Resource URLs in events
  • Partial parsing / handling of events in consumers
  • Events as Atom Feeds

Prerequisites

  • You need to have Docker installed

How to run and install the example

In the root directory you need to

  1. Compile everything with ./mvnw package
  2. Start everything up with docker-compose up --build

Running on Kubernetes

Mind the KubernetesSetup.md file in the kubernetes directory

URLs and Ports

Each of the modules is it's own Spring Boot Application which can be accessed as follows:

Name Application / Enpoint Type URL
Application Process 9000 http://localhost:9000
Credit Application 9001 http://localhost:9001/credit-application
Customer 9002 http://localhost:9002/customer and http://localhost:9002/customer/feed
Scoring 9003 No UI
CreditDecision 9004 http://localhost:9004/credit-decision and http://localhost:9004/credit-decision/feed

Messaging Infrastructure & Domain Events

Public Events

CreditApplicationNumberGeneratedEvent

Source: application-process

Persisted in source: no

Consumers:

  • credit-application
  • credit-decision

Topic: CreditApplicationNumberGeneratedTopic

CreditApplicationEnteredEvent

Source: credit-application

Persisted in source: yes in its own Table via JPA

Consumers:

  • application-process
  • credit-decision

Topic: CreditApplicationEnteredTopic

CustomerCreatedEvent

Source: customer

Persisted in source: no

Consumers:

  • application-process
  • credit-decision

Topic: CustomerCreatedTopic

ScoringPositiveEvent

Source: scoring

Persisted in source: no

Consumers:

  • application-process
  • credit-decision

Topic: ScoringPositiveTopic

ScoringNegativeEvent

Source: scoring

Persisted in source: no

Consumers:

  • application-process
  • credit-decision

Topic: ScoringNegativeTopic

ApplicationDeclinedEvent

Source: credit-decision

Persisted in source: not as an event

Consumers:

  • application-process

Topic: ApplicationDeclinedTopic

Internal Events

Credit-Application

  • CreditDetailsEnteredEvent
  • FinancialSituationEnteredEvent

Both events are stored Source: credit-application Storage: Own Table via JPA

Feeds

Customer Feed

Url: http://localhost:9002/customer/feed

Contains URLs to Customer Resources

Credit Decision Feed

Url: http://localhost:9004/credit-decision/feed

Contains Application Numbers that have been confirmed

Event Types being used

This demo shows various types of event types: Events with all the data, Events with Resource Urls and "Events" as Feeds

Events with all the data

Especially the CreditApplicationEnteredEvent falls into this category: it contains all of the data for the credit application such as the financial situation and the details of the actual credit. By consuming this event you will not need additional roundtrips to upstream systems

Other events that fall into this category are:

  • ApplicationNumberGeneratedEvent
  • ScoringNegativeEvent
  • ScoringPositiveEvent
  • ApplicationDeclinedEvent
Idea of Bounded Context:

Please take a close look at how the CreditApplicationEnteredEvent is being reflected in the scoring application. Yes, we take in all the payload from the broker but the public model of the event has a clear focus on the scoring context's view on the data.

Events with a Resource URL

These Events do not contain a lot of information. They may contian something like a business process identifier such as the applicationNumber in this example but for the purpose of this demo I refrained from doing that. So the CustomerCreatedEvent only contians the URL to the Customer REST Resource from which interested contexts can obtain the payload from.

"Events" via Feeds

Althoug the usage of feeds is no plain and pure event driven processing style I think that they come in handy when you are dealing with situations like these:

  • you have issues with your message broker and firewalls and these issues can't be resolved easily
  • you need to have an event replay functionality in place that enables consumers to restore their replicated data

You can find "Events via Feeds" in the customer and the credit-decision (see Feeds) applications.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].