pattern

Message Router

A component that inspects a message and forwards it to one of several destinations based on its content or headers.

messagingeiprouting

One of the foundational enterprise integration patterns, and the one that keeps a topology from becoming point-to-point. Producers publish once; the router decides where each message goes based on type, region, priority, tenant or any payload attribute.

Variants worth naming: a content-based router decides from the payload; a recipient list sends to several destinations; a dynamic router consults a routing table that can change at runtime, which lets consumers register themselves rather than requiring a producer change.

The caution mirrors the API gateway's: routing logic accretes. A router that begins as "send priority orders to the fast queue" becomes a place where business rules live, at which point it is a shared component every team must queue to change and the least testable part of the flow.

Keep routing decisions based on declared message attributes rather than on interpreting the payload semantically.