{"id":21401602,"url":"https://github.com/mploed/event-driven-spring-boot","last_synced_at":"2025-04-09T19:19:53.164Z","repository":{"id":44909565,"uuid":"91689166","full_name":"mploed/event-driven-spring-boot","owner":"mploed","description":"Example Application to demo various flavours of handling domain events in Spring Boot","archived":false,"fork":false,"pushed_at":"2018-09-24T08:53:12.000Z","size":419,"stargazers_count":270,"open_issues_count":2,"forks_count":123,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-04-09T19:19:49.088Z","etag":null,"topics":["atom","event-driven","event-sourcing","events","feed","rest-api","spring","spring-boot","spring-cloud-stream","spring-data-jpa"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mploed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-18T12:10:05.000Z","updated_at":"2025-03-24T14:24:40.000Z","dependencies_parsed_at":"2022-09-15T20:50:16.428Z","dependency_job_id":null,"html_url":"https://github.com/mploed/event-driven-spring-boot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mploed%2Fevent-driven-spring-boot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mploed%2Fevent-driven-spring-boot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mploed%2Fevent-driven-spring-boot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mploed%2Fevent-driven-spring-boot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mploed","download_url":"https://codeload.github.com/mploed/event-driven-spring-boot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248094991,"owners_count":21046770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atom","event-driven","event-sourcing","events","feed","rest-api","spring","spring-boot","spring-cloud-stream","spring-data-jpa"],"created_at":"2024-11-22T15:28:36.240Z","updated_at":"2025-04-09T19:19:53.145Z","avatar_url":"https://github.com/mploed.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Event Driven Applications with Spring Boot\n\nThis projects tries to capture various options you have when dealing with Event Driven Spring Boot applications.\nThe follwing Spring Technologies are being used:\n- Spring Boot\n- Spring Cloud Stream Rabbit\n- Spring Data JPA\n\nThese examples contain various different ways to model and deal with events:\n- Complete aggregates / entities in the events\n- REST Resource URLs in events\n- Partial parsing / handling of events in consumers\n- Events as Atom Feeds\n\n## Prerequisites\n- You need to have Docker installed\n\n## How to run and install the example\nIn the root directory you need to\n1. Compile everything with ./mvnw package\n2. Start everything up with docker-compose up --build\n\n## Running on Kubernetes\nMind the KubernetesSetup.md file in the kubernetes directory\n\n## URLs and Ports\nEach of the modules is it's own Spring Boot Application which can be accessed as follows:\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003cth\u003eName\u003c/th\u003e\n        \u003cth\u003eApplication / Enpoint Type\u003c/th\u003e\n        \u003cth\u003eURL\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eApplication Process\u003c/td\u003e\n        \u003ctd\u003e9000\u003c/td\u003e\n        \u003ctd\u003ehttp://localhost:9000\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eCredit Application\u003c/td\u003e\n        \u003ctd\u003e9001\u003c/td\u003e\n        \u003ctd\u003ehttp://localhost:9001/credit-application\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eCustomer\u003c/td\u003e\n        \u003ctd\u003e9002\u003c/td\u003e\n        \u003ctd\u003ehttp://localhost:9002/customer and http://localhost:9002/customer/feed\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eScoring\u003c/td\u003e\n        \u003ctd\u003e9003\u003c/td\u003e\n        \u003ctd\u003eNo UI\u003c/td\u003e\n    \u003c/tr\u003e\n     \u003ctr\u003e\n        \u003ctd\u003eCreditDecision\u003c/td\u003e\n        \u003ctd\u003e9004\u003c/td\u003e\n        \u003ctd\u003ehttp://localhost:9004/credit-decision and http://localhost:9004/credit-decision/feed\u003c/td\u003e\n    \u003c/tr\u003e\n      \n    \n\u003c/table\u003e\n\n## Messaging Infrastructure \u0026 Domain Events\n\n### Public Events\n\n#### CreditApplicationNumberGeneratedEvent\nSource: application-process\n\nPersisted in source: no\n\nConsumers:\n- credit-application\n- credit-decision\n\nTopic: CreditApplicationNumberGeneratedTopic\n\n\n#### CreditApplicationEnteredEvent\nSource: credit-application\n\nPersisted in source: yes in its own Table via JPA\n\nConsumers:\n- application-process\n- credit-decision\n\nTopic: CreditApplicationEnteredTopic\n\n\n#### CustomerCreatedEvent\nSource: customer\n\nPersisted in source: no\n\nConsumers:\n- application-process\n- credit-decision\n\nTopic: CustomerCreatedTopic\n\n#### ScoringPositiveEvent\nSource: scoring\n\nPersisted in source: no\n\nConsumers:\n- application-process\n- credit-decision\n\nTopic: ScoringPositiveTopic\n\n#### ScoringNegativeEvent\nSource: scoring\n\nPersisted in source: no\n\nConsumers:\n- application-process\n- credit-decision\n\nTopic: ScoringNegativeTopic\n\n#### ApplicationDeclinedEvent\nSource: credit-decision\n\nPersisted in source: not as an event\n\nConsumers:\n- application-process\n\nTopic: ApplicationDeclinedTopic\n\n### Internal Events\n\n#### Credit-Application\n- CreditDetailsEnteredEvent\n- FinancialSituationEnteredEvent\n\nBoth events are stored\nSource: credit-application\nStorage: Own Table via JPA\n\n\n### Feeds\n\n#### Customer Feed\nUrl: http://localhost:9002/customer/feed\n\nContains URLs to Customer Resources\n\n#### Credit Decision Feed\nUrl: http://localhost:9004/credit-decision/feed\n\nContains Application Numbers that have been confirmed\n\n\n## Event Types being used\nThis demo shows various types of event types: Events with all the data, Events with Resource Urls and \"Events\" as Feeds\n\n#### Events with all the data\nEspecially the CreditApplicationEnteredEvent falls into this category: it contains all of the data for the credit application\nsuch as the financial situation and the details of the actual credit. By consuming this event you will not need additional\nroundtrips to upstream systems\n\nOther events that fall into this category are:\n- ApplicationNumberGeneratedEvent\n- ScoringNegativeEvent\n- ScoringPositiveEvent\n- ApplicationDeclinedEvent\n\n##### Idea of Bounded Context:\nPlease take a close look at how the CreditApplicationEnteredEvent is being reflected in the scoring application. Yes, we\ntake in all the payload from the broker but the public model of the event has a clear focus on the scoring context's view \n  on the data.\n\n#### Events with a Resource URL\nThese Events do not contain a lot of information. They may contian something like a business process identifier such as\nthe applicationNumber in this example but for the purpose of this demo I refrained from doing that. So the CustomerCreatedEvent\nonly contians the URL to the Customer REST Resource from which interested contexts can obtain the payload from.\n\n\n#### \"Events\" via Feeds\nAlthoug the usage of feeds is no plain and pure event driven processing style I think that they come in handy when you\nare dealing with situations like these:\n- you have issues with your message broker and firewalls and these issues can't be resolved easily\n- you need to have an event replay functionality in place that enables consumers to restore their replicated data\n\nYou can find \"Events via Feeds\" in the customer and the credit-decision (see Feeds) applications. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmploed%2Fevent-driven-spring-boot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmploed%2Fevent-driven-spring-boot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmploed%2Fevent-driven-spring-boot/lists"}