Results 1 to 2 of 2

Thread: else condition for xpath-router

  1. #1

    Default else condition for xpath-router

    Hi Guys,

    Just a quick question about xpath-router. in xpath-router configuration it provides kind of conditional statements based on expression.

    Code:
    <int-xml:xpath-router id="responderRouter" input-channel="orderChannel">
        <int-xml:xpath-expression expression="/request/responders"/>
        <int-xml:mapping value="responderA" channel="channelA"/>
        <int-xml:mapping value="responderB" channel="channelB"/>
    </int-xml:xpath-router>
    Does this provides ElSE functionality. i had a look at spring integration xsd as well but couldn't find any thing related to this. Is there any way of achieving this else functionality?

    appreciate your help

    Thanks,
    Kelumt

  2. #2
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,037

    Default

    Add a default-output-channel

    From the SI Schema (abstractRouterType):

    Reference to the channel where Messages should be sent if
    channel resolution fails to return any channels. If no
    default output channel is provided, the router will throw an
    Exception.

    If you would like to silently drop those messages instead,
    add the "nullChannel" as the default output channel attribute
    value.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •