Multi-Node Routing

Multi-Node Routing (MNR) allows multiple Solace PubSub+ message brokers to be networked together so that Direct messages published from clients connected to one message broker can be delivered to clients connected to other message brokers. This effectively distributes message routing loads across multiple message brokers in a network resulting in aggregate message forwarding rates across the network that exceed the capacity of any one message broker.

Solace's Content Shortest Path First (CSPF) protocol is used to link neighboring message brokers and allow them to discover the complete messaging network topology to which they belong. Message brokers can then determine which neighbor is the optimal node for forwarding messages addressed to specific destination message brokers. Topology discovery is continuous and dynamically updated as message brokers within the network go on or off line.

The Subscription Management Routing Protocol (SMRP) is also used to enable linked neighboring message brokers to propagate topic subscriptions added by the clients of one message broker throughout the messaging network. This allows messages that are published to one message broker to be routed to other message brokers that also have connected clients interested in those topics.

By default, data and routing traffic carried over MNR links is carried in plain text over TCP. Data compression can be applied on these links; however, if you'll be transmitting sensitive data in the messages sent between message brokers, Transport Layer Security (TLS)/ Secure Sockets Layer (SSL) encryption can be applied to the MNR linksʼ data channels.

For information on how to configure and manage routing links and how to enable subscriptions to be exported over those links, refer to Multi-Node Routing Management.

Linking Message Brokers

A routing link defines the route for connectivity between message brokers. When building a messaging network, administrators must explicitly configure the routing links between message broker neighbors. Both ends of a message routing link must be configured. That is, to link message brokers A and B, there must be a neighbor configuration in A for B, and a neighbor configuration in B for A. Using these bi-directional links, those neighbors are then able to exchange network topology using the CSPF protocol and subscription information using SMRP. These configured neighbor links allow Direct messages published by clients to travel between neighbors on their way to the final subscriber clients.

Compression can optionally used on neighbor message broker data connections (only data connections are affected).

Multiple bi-directional routing links can be used to route messages between message brokers in your network for load balancing or redundancy, and the routing protocols that are used will calculate the shortest path (as defined by link costs). Routes with lower link costs are preferred over those with higher link costs. If there are multiple routing links with equal cost paths, then a route with less hops will be chosen as the preferred route.

Where alternative routes are possible, an administrator can assign explicit link costs to indicate the best inter-neighbor message route. The rationale for assigning a higher link cost to a particular route could be based on considerations such as the speed, latency, or monetary cost of the underlying communication link.

Routing Link Cost Examples

To prefer one route over another (for example, to specify a default link), you can change the routing link costs to set the preferred message route.

In the example shown in Routing Link Cost—Example 1, there are four bi-directional routing links available between message brokers A, B, C, and D:

  • A-B routing link
  • B-C routing link
  • B-D routing link
  • C-D routing link

If the cost associated with the A-B routing link is set to 150, and the cost associated with the three other routing links is set to 100, messages routed from message broker A to C travel from message broker A to message broker B and then on to message broker C.

Routing Link Cost—Example 1
Routing Link Cost-Example 1

However, as shown in Routing Link Cost Example 2 , if the cost associated with the A-B routing link is set to 150, while the cost associated with the B-C routing link is set to 250, and the cost associated with the C-D and B-D routing links is set to 100, messages routed from message broker A to C travel from message broker A to Site B, on to message broker D, and then to message broker C. Such a cost configuration may be desirable in cases where, for example, two message broker sites in one city are connected by a high-speed link, while other overseas message broker sites are connected by low-speed links.

Routing Link Cost Example 2
Routing Link Cost—Example 2

Subscription Propagation and Management

When MNR is used, topic subscriptions and matching messages are only distributed between matching Message VPNs. This means that a message broker with a topic subscription in one message VPN can only receive matching messages from a neighbor message broker that were published to a Message VPN of the same name. For example if a message was published to Message VPN Blue on Router A, that message may be delivered to a client on Router B with a matching topic subscription in a Message VPN Blue, but it may not be delivered to a client on Router B with a matching topic subscription in a Message VPN Green.

Topic subscriptions can be added by external clients and internal clients (for example, the internal client of the Message VPN, #client). When external client subscriptions are associated with a specific virtual router name; internal client subscriptions are associated with a physical message broker name.

Exporting Topic Subscriptions

Each Message VPN has a topic subscription export policy associated with it, which controls whether or not topic subscriptions on the Message VPN get advertised to other message brokers in the network. The default policy is to not export subscriptions.

To receive messages from other message brokers, the subscription export policy in a Message VPN must be set to export subscriptions. This causes all subscriptions added locally to the Message VPN to be dynamically propagated to the other message brokers in the network.