Contents

The FioranoMQ Content Based Routing supports elements and attributes typical to XML. Later versions of FioranoMQ support all XML files. It is recommended that XML files remain small so that they can be parsed and delivered quickly. Large XML files take longer to parse and distribute. While formatting XML, several methods are available to package the information. This implies that information can be packaged in Elements only, in Attributes only, or in Elements and Attributes XML. Depending on the packaging, it can be optimized for CBR.

For example, if a subscriber wants to receive stock information from company XYZ whereas the XML file contains stock information on companies XYZ and company ABC, then the subscriber receives some information it does not require or need. Therefore, while disseminating stock quotes, it is preferable to add information pertaining to only one stock in a single message.

This ensures that:

  • Messages remain small.
  • Unwanted content is not sent to the subscribers.

For the purpose of discussion, XML files can be broken into three categories: Elements only, Attributes only, and Elements and Attributes. Examples of each type of XML, as well as example message selectors can be found in the section below. When wrapping data in XML, so as to be optimized for content-based routing, it is recommended that 'elements only' and/or 'attributes only' be used to enable highest message throughput.

An example of Elements Only is:

In the above example, the level of nesting is not fixed to two, but shows that this XML type contains only elements. This type of XML is the fastest to process.

An example of attributes only is:

The above example shows that there are only attributes with no elements that can be referenced. This does not imply that an elements only XPATH, such as "/Stock quotes/Quote Symbol IS NOT NULL," cannot be used. This selector indicates that any XML message containing this element can be selected. This type of XML is a little slower to process than 'elements only' type of XML.

An example of elements and attributes is:

The above example shows how elements can be found within the elements containing attributes. Processing this type of XML can be much slower than processing either of the other two types of XML, depending upon the size of the message. This XML would require more complex XPath identifiers.

Adaptavist ThemeBuilder EngineAtlassian Confluence