https://github.com/masstransit/sample-outbox
Shows how to use the new transactional outbox
https://github.com/masstransit/sample-outbox
Last synced: 26 days ago
JSON representation
Shows how to use the new transactional outbox
- Host: GitHub
- URL: https://github.com/masstransit/sample-outbox
- Owner: MassTransit
- Created: 2022-06-17T01:14:46.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-08-18T23:00:44.000Z (about 1 year ago)
- Last Synced: 2025-10-09T22:46:50.236Z (26 days ago)
- Language: C#
- Size: 40 KB
- Stars: 89
- Watchers: 5
- Forks: 28
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Transactional Outbox Sample
This sample shows how to configure and use MassTransit's new transactional outbox, including:
- An API controller that uses a domain registration service to register a member for an event. The controller has no knowledge of MassTransit, and the registration service uses `IPublishEndpoint` to publish a domain event which is written to the transactional outbox.
- Adds the transactional outbox delivery service as a hosted service, which delivers outbox message to the transport.
- A separate service that consumes the domain event by itself, and also includes a saga state machine which uses the transactional outbox (and inbox, for idempotent message delivery).
## Video
This sample is explained in [this video](https://youtu.be/3TjGnmLno_A).
# Run in Docker
To run the sample using Docker, just type `docker compose up --build` and connect to [localhost](http://localhost:5000/swagger) to test the API.