Dynamic Message Routing

An event mesh is a network of event brokers and event broker services (or nodes) that routes events between applications, no matter where those applications are connected or deployed. Dynamic Message Routing (DMR) is a mechanism that allows connected nodes to automatically determine how to forward event messages. You use DMR to create a DMR network, which is a type of event mesh that connects individual event brokers within the same site (horizontal scaling) or between sites (multi-site scaling) to exchange subscription information.

After the administrator establishes the relationships between nodes, the nodes dynamically discover how to route messages. Client applications don't have to know about other sites in the network or take any special action to publish or consume messages across it. You can move applications or change their interests, and the DMR network automatically updates the routing without any intervention.

DMR Benefits

You can use DMR to:

  • scale beyond a single node by networking several nodes together to spread the load among them
  • connect applications distributed across multiple sites, which can include multiple public and private clouds as well as legacy data centers, such as on-premises applications that need to reach cloud services like AWS Lambda, Azure Event Hubs, or Google Functions
  • use bandwidth efficiently, because a node receives an event only when an application connected to it has a matching subscription, and events cross between sites only once no matter how many consumers subscribe
  • keep applications independent of where they run, because the DMR network handles routing and you do not need to rely on the messaging services of a single cloud provider

DMR supports two basic use cases: horizontal scaling and multi-site scaling. More complicated topologies are possible. If the use cases discussed here don't address your needs, contact Solace for assistance with designing and implementing your DMR network.

Horizontal Scaling

For horizontal scaling, you connect event brokers to create a DMR cluster. Each node (event broker, high-availability group, or event broker service) in the cluster has a connection to every other node. These connections within the same cluster are called internal links; collectively, we refer to this as a "full mesh" of links. Within this fully-meshed cluster, each node is aware of all the others so that every event published in the network is routed to the consuming applications.

Event broker services are usually set up as single-node clusters and don't use horizontal scaling.

DMR clusters are frequently used for software and hardware event brokers at the same site. You can mix event brokers of different form factors in a DMR network, as long as you take their subscription capacities into account. For more information, see Subscription Limits.

Illustration depicting the concepts described in the surrounding text.

For more information, see DMR Subscription Propagation and Data Forwarding and the Horizontal Scaling example.

Multi-Site Scaling

In multi-site scaling, you connect two or more clusters together. Connections between clusters are called external links. The clusters are connected via a gateway node in each cluster. You do not need to connect each cluster to every other cluster; however, messages propagate only between directly connected clusters. For example, if you do not configure an external link between two clusters, messages do not pass between them. As shown in the following diagram, messages do not pass between Cluster A and Cluster C because they are not connected.

Illustration depicting the concepts described in the surrounding text.

For more information, see DMR Subscription Propagation and Data Forwarding and the Multi-Site Connectivity example.

Message Flow in a DMR Network

This scenario shows how DMR works. The following diagram shows a horizontally-scaled cluster on-premises, which is connected to a DMR cluster in the public cloud (AWS in the example) and another cluster in a platform-as-a-service (PaaS) (Kubernetes in the example).

A publishing application (A) comes online and publishes to a topic, for example, tools/orders. A consuming application (B) in the same cluster comes online, binds to its queue, and subscribes to topic tools/orders. Events flow from application A to application B, preserving the quality of service (guaranteed or direct) of the publishing application A.

In addition, all subscriptions are shared between connected clusters. As a result, event messages published by an application in one cluster are routed to consuming applications in other clusters.

In the following example, another consumer (C) comes online and subscribes to the same topic, tools/orders. Any event with topic tools/orders is now routed to the new consumer. As more publishers and consumers connect and disconnect, the routing is dynamically updated in the DMR network.

Illustration depicting the concepts described in the surrounding text.

Controlling Subscription Export

By default, every subscription in a Message VPN is advertised to other clusters over the VPN's external DMR links. You can restrict this using DMR Export Filters, which let you allow or disallow specific subscription patterns from being exported. For example, you can protect wide area network (WAN) bandwidth from heavy network traffic resulting from broad local subscriptions or keep subscriptions in one environment from leaking into another.

DMR and Message VPN Comparison

DMR and VPN bridges are two alternative technologies for interconnecting event brokers. Both support guaranteed (persistent) and direct (non-persistent) messages. The advantage of DMR over VPN bridges is that with DMR you don’t need to statically configure topic subscriptions to define which events flow over the inter-broker links. DMR automatically routes your guaranteed and direct messages through your DMR network to all interested subscribers.

Broker Manager includes a Click-to-Connect wizard that creates a DMR network. Click-to-Connect is also provided for VPN bridges, but you must then configure the topics that the bridges subscribe to.

When you want to strictly control which events go over a link between event brokers, use VPN bridges. When you want to build a large event mesh with minimal configuration effort and dynamic propagation of subscriptions throughout the event mesh, we recommend DMR.

Feature Interactions

Disaster Recovery (Replication)
You can take advantage of disaster recovery (using replication and Config-Sync) within your DMR network. Replication provides business continuity and allows mission‑critical applications to continue to function during a major service outage to a data center. For more information, see Data Center Replication for Disaster Recovery and Configuring Replication with a DMR Network.
Message VPN Bridging
VPN bridges and DMR are compatible, and can be used at the same time. However, we recommend that you don't configure VPN bridge links and DMR links between the same event brokers because this configuration causes duplicate message delivery.
Multi-Node Routing
Multi-Node Routing (MNR) and DMR cannot be used at the same time. They are mutually exclusive.

If you want to migrate from MNR to DMR, contact Solace for assistance.

Next Steps