Hi all,
I have strange problem where EIP-content-based-router is miss routing a
message and I don't understand why. I'm hoping someone can enlighten me.
Below I have included the message information at the origin, the appropriate
configuration of eip and the message as delivered. The problem I'm having is
that the message is being delivered to the wrong endpoint,
'dispatch-set-param', when it should be going to 'reprint'.
Why is the wrong selection predicate matching the message?
I have included the default route to demonstrate that matching is occuring
and the wrong rule is being fired.
Stuart.
The message at origin:
Out Message:ID:192.168.1.11-122ac055cf3-3:0
status:Active
role:javax.jbi.messaging.messageexchange$r...@11e8050
service:{http://somedom.co.uk/jfv/routing}scanner-request
endpoint:null
in:StringSource[<?xml version="1.0" encoding="UTF-8"?>
<typePrintReprint xmlns="http://somedom.co.uk/jfv/messaging">
<prevJobRef>
<ref>121</ref>
</prevJobRef>
<areaRef>1</areaRef>
</typePrintReprint>]
EIP config:
<beans ...
xmlns:routing="http://somedom.co.uk/jfv/routing"
xmlns:ch="http://somedom.co.uk/jfv/configHandler"
... >
<eip:namespace-context id="nsContext">
<eip:namespaces>
<eip:namespace
prefix="msgns">http://somedom.co.uk/jfv/messaging</eip:namespace>
</eip:namespaces>
</eip:namespace-context>
<eip:content-based-router service="routing:scanner-request"
endpoint="endpoint">
<eip:rules>
<eip:routing-rule>
<eip:predicate>
<eip:xpath-predicate xpath="count(/msgns:typeDispatchSetParamValue) =
1" namespaceContext="#nsContext" />
</eip:predicate>
<eip:target>
<eip:exchange-target service="ch:inbound"
endpoint="dispatch-set-param" />
</eip:target>
</eip:routing-rule>
<eip:routing-rule>
<eip:predicate>
<eip:xpath-predicate xpath="count(/msgns:typePrintReprint) = 1"
namespaceContext="#nsContext" />
</eip:predicate>
<eip:target>
<eip:exchange-target service="ch:inbound" endpoint="reprint" />
</eip:target>
</eip:routing-rule>
<!-- FYI: Default target :
<eip:exchange-target service="ch:inbound" endpoint="request"/>
-->
</eip:rules>
</eip:content-based-router>
Message delivered:
id: ID:192.168.1.11-122ac055cf3-4:1
status: Active
role: provider
service: {http://somedom.co.uk/jfv/configHandler}inbound
endpoint: dispatch-set-param
in: <?xml version="1.0" encoding="UTF-8"?><typePrintReprint
xmlns="http://oviconline.co.uk/jfv/messaging">
<prevJobRef>
<ref>121</ref>
</prevJobRef>
<areaRef>1</areaRef>
</typePrintReprint>
out: null
]