Skip to content

ADR-0002 NATS Messaging

Accepted.

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.

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.

  • 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.