Silo 01
Message Silo
An event-driven workflow platform powered by ActiveMQ to coordinate asynchronous order and compliance tasks.
Requirements
- Decouple compliance checks from synchronous order APIs.
- Provide replay-safe processing for transient downstream failures.
- Surface workflow status to operations in near real time.
Stack
- Node.js
- TypeScript
- ActiveMQ
- Redis
- Docker
Architecture
- Producers publish domain events into dedicated ActiveMQ queues.
- Consumer groups process workflows with retry and dead-letter handling.
- A status API aggregates queue and job state for operators.
Workflow
- Order service emits `order.created` into ingress queue.
- Routing worker fans out events to compliance, billing, and notification queues.
- Consumers acknowledge on success or route failed messages to DLQ after retry policy.
- Ops dashboard exposes queue depth, DLQ volume, and replay controls.
Diagram
flowchart LR
A[Order API] --> B[ActiveMQ Ingress Queue]
B --> C[Routing Worker]
C --> D[Compliance Queue]
C --> E[Billing Queue]
C --> F[Notification Queue]
D --> G[Compliance Consumer]
E --> H[Billing Consumer]
F --> I[Notification Consumer]
G --> J[DLQ]
H --> J
I --> J
J --> K[Replay Tool]
Tradeoffs
- Higher operational complexity versus direct synchronous calls.
- Eventual consistency accepted to gain resilience and scalability.
- Message schema governance required to avoid contract drift.
Risks / Failure Modes
- Consumer idempotency gaps can create duplicate side effects.
- Poor DLQ triage can hide chronic integration failures.
- Queue backpressure can delay user-facing state visibility.
Outcomes
- Reduced cross-service coupling by moving blocking integrations to async events.
- Improved failure visibility with dead-letter inspection and replay tooling.
- Cut median processing latency by 37% during peak load windows.