NATS CommandBus transport (distributed single writer) #9

Open
opened 2026-02-19 21:28:02 +00:00 by ash · 0 comments
Owner

What

Add NATS transport to CommandBus for distributed deployments.

Design

  • Same CommandBus interface, NATS queue groups as transport
  • Client sends command to NATS queue → single processor per stream
  • SendAndWait via reply subjects or result stream
  • Graceful failover: if processor dies, another picks up

Reference

Myrra command package at /tmp/yoyopass/pkg/myrra/command/ for patterns.
Make it better: generic commands, no baked-in OTel.

Tests

  • Integration test with embedded NATS
  • Failover behavior
  • Ordering guarantees
  • Benchmark vs in-process bus overhead
## What Add NATS transport to CommandBus for distributed deployments. ## Design - Same CommandBus interface, NATS queue groups as transport - Client sends command to NATS queue → single processor per stream - SendAndWait via reply subjects or result stream - Graceful failover: if processor dies, another picks up ## Reference Myrra command package at /tmp/yoyopass/pkg/myrra/command/ for patterns. Make it better: generic commands, no baked-in OTel. ## Tests - Integration test with embedded NATS - Failover behavior - Ordering guarantees - Benchmark vs in-process bus overhead
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ash/eskit#9
No description provided.