/
Guide to XML DSL (Content-based Router)

Guide to XML DSL (Content-based Router)

In some scenarios, a single logical process and its implementation (ie. price check), could be spread across many different physical systems. We need to ensure that the message is being sent to the correct consumer using information contained with the message itself.

In the following example, we see the implementation of a Content-based Router pattern to route the message to the correct consumer using the Choice option.

 

XML DSL Example

 

<route> <from uri="jms:queue:order"/> <choice> <when> <simple>${header.type} in 'widget,wiggy'</simple> <to uri="jms:queue:order:widget"/> </when> <when> <simple>${header.type} == 'gadget'</simple> <to uri="jms:queue:order:gadget"/> </when> <otherwise> <to uri="jms:queue:order:misc"/> </otherwise> </choice> </route>

Related content

XML DSL (Content-based Router)
XML DSL (Content-based Router)
More like this
Guide to Java DSL (Content-based Router)
Guide to Java DSL (Content-based Router)
More like this
Java DSL (Content-based Router)
Java DSL (Content-based Router)
More like this
Guide to Content-based Router (Message Routing)
Guide to Content-based Router (Message Routing)
More like this