Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 1.08 KB

README.md

File metadata and controls

24 lines (19 loc) · 1.08 KB

MassTransitOutboxScaleout

Trying out some scenarios with MassTransit's Transactional Outbox.

This sample is inspired heavily by the MassTransit sample transactional outbox application.

How to run (Docker)

This will spin up a SQL Server, RabbitMQ, create the database, and run the entire sample.

docker compose up --build

Run with multiple sweepers

docker compose up --build --scale sweeper=4

Architecture

This simple application uses the Producer to write messages to the outbox. A separate Sweeper service polls the messages written to the outbox table, and delivers them to the broker (RabbitMQ). The Consumer simply consumes the messages.

Projects:

  • Producer: Publishes a handful of notify-registration messages every second to the transactional outbox
  • Sweeper: Polls the outbox table and delivers messages from the transactional outbox to the broker
  • Consumer: Consumes notify-registration messages
  • CreateDb: Ensures a fresh copy of the Registration database is created prior to running the other services