Microservices and events
Microservices and events do not exclude each other. In conveyor, advancing an operation is synchronous: the user waits for the rule to run and the commit to happen. Notifying the partner is a consequence: it goes out as an event on RabbitMQ and notifications handles it at its own pace, calling auth synchronously only to learn who should receive it.
Decisions and why
- Synchronous command, asynchronous consequence
- The user waits for the advance; nobody waits for the notice and the e-mail.
- An event says what happened
- OPERATION_MOVED, not "send an e-mail": the publisher does not know its consumers.
- One failure does not take down another
- If notifications is down, advancing still works and the notice arrives when it comes back.
- A microservice when the boundary is real
- Auth, the pipeline, files, notifications and e-mail have their own data and pace. Without that, it is a module, not a service.
requestresponse
Pick a scenario above to watch the message travel through the architecture.