Announcement Announcement Module
Collapse
No announcement yet.
header-value-router Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • header-value-router

    I'm using SI 1.3
    I'm trying to use the header value router to do the following:
    If a message comes in with a header value of "specificValue" for head "specificHeader", I want to route to a "one-off-channel". If a message comes in with a header value other than "specificValue" for the "specificHeader" I want it to go to the normalFlowChannel

    I have this:
    <header-value-router
    input-channel="incomingChannel"
    header-name="specificHeader"
    default-output-channel="normalFlowChannel">
    <mapping
    value="specificValue"
    channel="one-off-channel" />
    </header-value-router>

    I thought the default-output-channel would take over if the incoming message had a specificHeader value of something other than specificValue but that does not seem to be the case.

    If a message comes in with a specificHeader value of specificValue than the message gets routed properly.

    However, if a message comes in with a specificHeader value of something other than specificValue, the message does not get routed anywhere.

    Also, what is the timeout parameter for in the header-value-router?

  • #2
    I added ignore-channel-name-resolution-failures="true" to the header-value-router and then things worked as I expected.

    Comment


    • #3
      Hi

      Not sure how it works for you but for me it says this:

      Caused by: org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException: Line 340 in XML document from ServletContext resource [/WEB-INF/spring/ersOrchestration-spring-config-si.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 340; columnNumber: 56; cvc-complex-type.3.2.2: Attribute 'ignore-channel-name-resolution-failures' is not allowed to appear in element 'int:header-value-router'.

      My configuration is as below

      <int:header-value-router input-channel="submitSyncReqChannel"
      header-name="MSG_HDR_NEXT_HNDSHK_ENDPT_MNM_CD"
      default-output-channel="submitRESTSyncReqChannel"
      ignore-channel-name-resolution-failures="true">
      <int:mapping value="XYZ" channel="submitAPISyncReqChannel" />
      </int:header-value-router>


      Regards
      LB

      Comment


      • #4
        Got the fix,ignore-channel-name-resolution-failures has been replaced with resolution-required with 2.1+ versions.
        http://docs.spring.io/spring-integra...tandardization

        Comment

        Working...
        X