18.1 The shape
This is the hub and distributed workers topology, which chapter 11 set up on one machine:
┌──────────────┐
storefront ───►│ hub │──── schedules, serves GraphQL and the console, runs no job
console ───►│ (one) │
└──────┬───────┘
│ jobs in Postgres run events over RabbitMQ
┌─────────┴─────────┐ ◄──────────────────────────────────────┐
▼ ▼ │
┌──────────┐ ┌──────────┐ │
│ worker 1 │ │ worker 2 │ ── claim jobs, run them ───────────┘
└──────────┘ └──────────┘| Process | Registers | Must not |
|---|---|---|
| hub | AddScheduler with the Postgres submitter, AddTraxGraphQL, the console, the machines | run jobs itself |
| worker | AddTraxWorker, AddMediator over the same trains | AddScheduler, AddTraxGraphQL |
Workers claim jobs from Postgres, each job by exactly one worker, so a third worker is a third container and nothing else.
SDK Reference
Deployment topologies | Move a domain data context to EF migrations | UseRabbitMq | AddTraxHealthCheck | Health and liveness | Startup refusals | UseTraxApiDashboard