Chapter 7. Optimizing Routes


It is possible, depending on your network's topology, that a message will multiple routes through the network. Red Hat JBoss A-MQ allows you to configure the network to reduce the number of alternate routes and choose the optimum route.

7.1. Introduction to Optimizing Routes


In network topologies such as a hub-and-spoke or a tree there exists a unique route between any two brokers. For topologies, such as a mesh or a complete graph, it is possible to have multiple routes between any two brokers. In such cases, you may need simplify the routing behavior, so that an optimum route is preferred by the network.

Configuring routing behaviour

Red Hat JBoss A-MQ provides two configuration settings that work in conjunction to refine routing behavior:
  • decreaseNetworkConsumerPriority—deprecates the priority of a network connector based on the number of hops from the message's origin so that messages are routed along the shortest route
  • suppressDuplicateQueueSubscriptions—suppresses duplicate subscriptions from intermediary brokers so that alternative paths are reduced
To be most effective these properties should be set on all of the network connectors in the network of brokers.