Skip to content

Instantly share code, notes, and snippets.

@rossmason
Forked from dfeist/choice-routing.xml
Created March 17, 2011 06:23
Show Gist options
  • Save rossmason/873919 to your computer and use it in GitHub Desktop.
Save rossmason/873919 to your computer and use it in GitHub Desktop.
<flow name="choiceFlow">
<description>
Flow that shows the use of the choice element for content-based routing
<description>
<jms:inbound-endpoint queue="in"/>
<choice>
<when expression="/element/@name = 'foo'" evaluator="xpath">
<jms:outbound-endpoint queue="fooQueue"/>
</when>
<when expression="/element/@name = 'bar'" evaluator="xpath">
<jms:outbound-endpoint queue="barQueue"/>
</when>
<otherwise>
<jms:outbound-endpoint queue="DeadLetterQueue"/>
</otherwise>
</choice>
</flow>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment