You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Stuart Roe <st...@ovic.co.uk> on 2009/07/28 15:54:07 UTC

RE: [SMX3.3.1]EIP Miss routing message, but why?(resolved)

Gert,

Thanks for replying. 

I did manage to identify the problem. Basically, the root of the problem was
a miss typed endpoint name on the service definition. The message was being
routed to endpoint="dispatch-set-param" because an endpoint="reprint" didn't
exist. I think that this is the default action, selecting a known endpoint
for the service and route the message there when the defined endpoint
doesn't exist. 

The fact that EIP was the component handling the message (and it content
routing to the same service with a different endpoints) was just bad luck
and completely unrelated.

Apologies for not following up, I didn't realise that anyone was actually
looking into the issue.

Stuart.

-----Original Message-----
From: Gert Vanthienen [mailto:gert.vanthienen@gmail.com] 
Sent: 28 July 2009 13:54
To: users@servicemix.apache.org
Subject: Re: [SMX3.3.1]EIP Miss routing message, but why?

Stuart,

I did a quick test with an XSL and could not find anything wrong with the
XPath you're using.  One thing you could try is putting
//msgns:typePrintReprint to make sure it really finds the correct nodes, but
if that doesn't work, we would like you to send us an simple SA that
reproduces the issue (just replace the input with a file sender and add some
samples files).

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/7/24 Stuart Roe <st...@ovic.co.uk>:
> 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$Role@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
> ]
>
>
>
>
>
>
>
>
>


Re: [SMX3.3.1]EIP Miss routing message, but why?(resolved)

Posted by Gert Vanthienen <ge...@gmail.com>.
Stuart,

Ok, thanks for the feedback!  If you try to route to an endpoint which
doesn't exists, ServiceMix will try again with only the service name
in an attempt to deliver the MessageExchange.  Normally, you should
find a warning in the log file when this happens.  Anyway, good to
hear you got your issue resolved...

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/7/28 Stuart Roe <st...@ovic.co.uk>:
> Gert,
>
> Thanks for replying.
>
> I did manage to identify the problem. Basically, the root of the problem was
> a miss typed endpoint name on the service definition. The message was being
> routed to endpoint="dispatch-set-param" because an endpoint="reprint" didn't
> exist. I think that this is the default action, selecting a known endpoint
> for the service and route the message there when the defined endpoint
> doesn't exist.
>
> The fact that EIP was the component handling the message (and it content
> routing to the same service with a different endpoints) was just bad luck
> and completely unrelated.
>
> Apologies for not following up, I didn't realise that anyone was actually
> looking into the issue.
>
> Stuart.
>
> -----Original Message-----
> From: Gert Vanthienen [mailto:gert.vanthienen@gmail.com]
> Sent: 28 July 2009 13:54
> To: users@servicemix.apache.org
> Subject: Re: [SMX3.3.1]EIP Miss routing message, but why?
>
> Stuart,
>
> I did a quick test with an XSL and could not find anything wrong with the
> XPath you're using.  One thing you could try is putting
> //msgns:typePrintReprint to make sure it really finds the correct nodes, but
> if that doesn't work, we would like you to send us an simple SA that
> reproduces the issue (just replace the input with a file sender and add some
> samples files).
>
> Regards,
>
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
>
>
>
> 2009/7/24 Stuart Roe <st...@ovic.co.uk>:
>> 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$Role@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
>> ]
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>