ADR-0002 NATS Messaging
Status
Section titled “Status”Accepted.
Context
Section titled “Context”The control plane must send originate commands to edges and receive real-time call/agent events, across an unreliable network, without tightly coupling the two sides or losing the contract across restarts.
Decision
Section titled “Decision”Use NATS as the messaging fabric. Originate commands and events flow over tenant-scoped subjects. Exactly one call engine consumes a given tenant’s originate subject.
Consequences
Section titled “Consequences”- Loose coupling: either side can restart without breaking the contract.
- Tenant-scoped subjects keep traffic isolated; a misrouted subject must never cross tenants.
- Duplicate consumers on an originate subject would double-dial — enforce one call engine per tenant.