This topic has not yet been written. The content below is from the topic description.
Chapter 35. Diverting and Splitting Message Flows HornetQ allows you to configure objects called diverts with some simple server configuration. Diverts allow you to transparently divert messages routed to one address to some other address, without making any changes to any client application logic. Diverts can be exclusive, meaning that the message is diverted to the new address, and does not go to the old address at all, or they can be non-exclusive which means the message continues to go the old address, and a copy of it is also sent to the new address. Non-exclusive diverts can therefore be used for splitting message flows, e.g. there may be a requirement to monitor every order sent to an order queue. Diverts can also be configured to have an optional message filter. If specified then only messages that match the filter will be diverted. Diverts can also be configured to apply a Transformer. If specified, all diverted messages will have the opportunity of being transformed by the Transformer. A divert will only divert a message to an address on the same server, however, if you want to divert to an address on a different server, a common pattern would be to divert to a local store-and-forward queue, then set up a bridge which consumes from that queue and forwards to an address on a different server. Diverts are therefore a very sophisticated concept, which when combined with bridges can be used to create interesting and complex routings. The set of diverts on a server can be thought of as a type of routing table for messages. Combining diverts with bridges allows you to create a distributed network of reliable routing connections between multiple geographically distributed servers, creating your global messaging mesh. Diverts are defined as xml in the hornetq-configuration.xml file. There can be zero or more diverts in the file. Please see Section 11.1.13, “Divert� for a full working example showing you how to configure and use diverts. Let's take a look at some divert examples: