Event Routing & Fanout Control

Typed events · Selective delivery · Scale

Overview

If every module processed every event, throughput would collapse as you add modules. 1SEC routes events only to modules that declared interest in that event type.

Why It Matters

  • Lower CPU usage per event
  • More predictable latency
  • Better isolation between modules
  • Clear schema contracts

Routing Mechanism

The bus publishes canonical events on typed subjects. Each module subscribes to a minimal set. Durable consumers ensure restart safety.

Pair this with schema validation to avoid silent mismatches. See Event schema.

Observability

Routing metrics are exposed at GET /api/v1/metrics. Use this to validate fanout reductions and spot mismatched event types.

Best Practices

  • Keep event types stable and explicit.
  • Validate ingestion at the edge (collectors).
  • Watch routing skipped counters.