Back to Catalog
Integration
Message Routing
Message Router
Inspect a message and send it to the right channel — routing logic in one place.
Intent & Description
Real-world Use Case
Order routing — all orders arrive on one channel. Router sends US orders to us-fulfillment, EU orders to eu-fulfillment, and priority orders to premium-fulfillment. Fulfillment services have zero knowledge of each other.
Source
📌 TL;DR
Message Router = traffic cop for your messages. One component, all routing decisions. Centralize routing logic, decouple senders from receivers.
Advantages
- Centralizes routing logic — one place to change routing rules
- Decouples producers from consumer addresses
- Clean separation of routing concern from processing concern
- Easy to add new routing rules without touching producers or consumers
Disadvantages
- Router becomes a single point of failure — must be HA
- Complex routing logic can make the router a bottleneck
- Centralized routing contradicts fully decentralized event-driven designs
- Testing complex routing tables is tedious