This section explains how to use FioranoMQ Content Based Routing (CBR) with samples and a description of XML syntax. FioranoMQ CBR is based on JMS 1.1 specifications with extensions to support content-based routing.
Setting up the FioranoMQ Server for CBR
The Content Based Routing support of FioranoMQ is available only in the Publish/ Subscribe JMS domain and not in the PTP (Point to Point) domain. By default, the CBR support is not enabled on the server. It can be enabled using the Fiorano Studio. Perform the following steps to set up the FioranoMQ server for CBR:
- Start the Fiorano Studio. Select Tools > Configure Profile from the menu bar, select the profile directory in the resulting. Select Profile Directory dialog box and click the Open button. This switches the FioranoMQ environment to offline mode.
- Navigate to FioranoMQ > Fiorano> etc> FMQConfigLoader in the Profile Explorer pane. The properties are displayed in the Properties pane.
- Select UseFioranoCbr property and set its value to True from the drop-down list.
- Right-click the root node in the profile explorer and select the Save option from the shortcut menu.
By the end of these steps, the CBR gets enabled in the server and clients can send and receive XML messages with XPath selectors. More information on client side changes is available in the subsequent sections.
FioranoMQ CBR XPath Support
FioranoMQ CBR utilizes a subset of XPath notation and SQL92 syntax to specify XPath message selectors; only absolute paths can be used.
It is possible to combine several XPath string with AND/OR conditions. For example, to provide an XML:
In the above example, if the messages for "Manchester United" alone are to be viewed, then the following XPath message selector can be used:
In the above example, if those messages in which "Manchester United" was the home team alone are to be viewed, the following XPath message selector can be used:
and