Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork27.2k
Implement Microservice pattern: Transactional outbox#3330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Implement Microservice pattern: Transactional outbox#3330
Conversation
github-actionsbot commentedOct 5, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
⏳Analyzing changes in this PR... ⏳ This might take a few minutes, please wait 📥 CommitsAnalyzing changes from base (
Resolves#2671
Resolves#2671
Resolves#2671
Resolves#2671
Resolves#2671 📁 Files being considered (20)➕ microservices-transactional-outbox/README.md(1 hunk) autogenerated bypresubmit.ai |
Hello@iluwatar the implementation is complete and it's ready for review whenever you have a moment. Please let me know if there are any changes or additional information you need from my side. |
What does this PR do?
This pull request implements the Transactional Outbox design pattern. It demonstrates how to ensure reliable, at-least-once message delivery from a service by atomically saving business data and its corresponding event in the same database transaction. This PR includes a fully documented code implementation, comprehensive unit tests covering success and failure scenarios, a detailed README and a PlantUML class diagram.
Key features
Customer
: The main business entity model that is being created and persisted.OutboxEvent
: The entity representing the message to be sent, which is stored transactionally in the outbox table.CustomerService
: The service that handles the core business logic, responsible for creating the Customer and the OutboxEvent in a single, atomic transaction.OutboxRepository
: The data access layer for reading from and writing OutboxEvent entities to the database.EventPoller
: A background process that periodically scans the outbox table for unprocessed events and publishes them to the message broker.MessageBroker
: A mock implementation that simulates sending the event to an external messaging system.This pull request is submitted as part of my participation in
Hacktoberfest 2025
Closes#2671