{"id":30536533,"url":"https://github.com/bertilmuth/modular-monolith-helloworld","last_synced_at":"2026-06-20T08:31:09.060Z","repository":{"id":112012842,"uuid":"400074698","full_name":"bertilmuth/modular-monolith-helloworld","owner":"bertilmuth","description":"A hello world style example of a producer and consumer communicating with an event bus.","archived":false,"fork":false,"pushed_at":"2021-08-27T20:07:45.000Z","size":80,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-27T23:50:18.284Z","etag":null,"topics":["event-bus","event-driven","java","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bertilmuth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-26T07:08:34.000Z","updated_at":"2024-08-18T16:48:02.000Z","dependencies_parsed_at":"2023-07-30T22:46:14.199Z","dependency_job_id":null,"html_url":"https://github.com/bertilmuth/modular-monolith-helloworld","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bertilmuth/modular-monolith-helloworld","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertilmuth%2Fmodular-monolith-helloworld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertilmuth%2Fmodular-monolith-helloworld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertilmuth%2Fmodular-monolith-helloworld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertilmuth%2Fmodular-monolith-helloworld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bertilmuth","download_url":"https://codeload.github.com/bertilmuth/modular-monolith-helloworld/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertilmuth%2Fmodular-monolith-helloworld/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34563535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["event-bus","event-driven","java","spring-boot"],"created_at":"2025-08-27T16:29:32.950Z","updated_at":"2026-06-20T08:31:09.056Z","avatar_url":"https://github.com/bertilmuth.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# modular-monolith-helloworld\nA hello world style example of a [producer](https://github.com/bertilmuth/modular-monolith-helloworld/blob/main/producer/src/main/java/com/example/monolith/producer/behavior/ProducerBehaviorModel.java) and [consumer](https://github.com/bertilmuth/modular-monolith-helloworld/blob/main/consumer/src/main/java/com/example/monolith/consumer/behavior/ConsumerBehaviorModel.java) communicating via a [connector](https://github.com/bertilmuth/modular-monolith-helloworld/blob/main/connector/src/main/java/com/example/monolith/consumer/behavior/ProducerConsumerConnector.java), using an event bus. The event bus sends and receives events asynchronously.\n\nEach module is contained in its own Gradle project.\nApart from `main` and `connector`, the modules have no dependencies.\n\nThis modular style of development potentially has the following benefits:\n* The modules mark *team boundaries*. Each team can work on its own data and behavior, hardly affected by the work of other teams. That can reduce the time to market of development teams.\n* Isolating the modules *reduces cognitive load*. A developer no longer needs to understand the whole application, but only the module she works on.\n* Reducing the dependencies avoids the dreaded *big ball of mud*, and makes the application in general more maintainable. In particular, it avoids cyclic dependencies between parts of the application.\n\nThis modular style has the following downsides:\n* It leads to *eventual consistency*. Since the modules communicate asynchronously, there is no guarantee for immediate consistency of data between modules.\n* More effort for *reliable messaging*. In a real world application, it must be made sure that no events get lost. This complicates the infrastructure logic.\n\n# Getting started\n1. Clone the project\n2. Change directory to `modular-monolith-helloworld`\n3. In one window, run the server with `./gradlew :main:bootRun`\n4. In another window, send a POST request with:\n\n`curl -H \"Content-Type: application/json\" -X POST -d '{\"@type\": \"RequestGreeting\", \"userName\":\"Sandra\"} http://localhost:8080/producer` (Unix)\n\n`iwr http://localhost:8080/producer -Method 'POST' -Headers @{'Content-Type' = 'application/json'} -Body '{\"@type\": \"RequestGreeting\", \"userName\":\"Sandra\"}` (Windows)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertilmuth%2Fmodular-monolith-helloworld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbertilmuth%2Fmodular-monolith-helloworld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertilmuth%2Fmodular-monolith-helloworld/lists"}