You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by tefo <te...@gmail.com> on 2010/05/27 09:45:08 UTC
[servicemix-eip]: content-based router and pipeline in servicemix
3.x
I am having problems using content-based router of servicemix-eip coupled
with pipeline in servicemix 3. Basically, I have an http-bc that accepts
Notify or Subscribe message and based on the input message I route the
message to a "css:notificaPipeline" or "css:persistenceRouteSlip". For the
Subscribe message all works fine.
For Notify predicate rule ( <eip:xpath-predicate xpath="//wsnt:Notify"
namespaceContext="#wnsContext" />)
I get ERROR: " 500 Use an InOnly or RobustInOnly MEP"
stack trace:...
java.lang.UnsupportedOperationException: Use an InOnly or
RobustInOnly MEP
at
org.apache.servicemix.eip.patterns.Pipeline.processAsyncProvider(Pipeline.java:362)
at
org.apache.servicemix.eip.patterns.Pipeline.processAsync(Pipeline.java:325)
at
org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:185)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627)
.....
It appears that "eip:content-based-router" pattern accepts all MEP but
output only IN-OUT MEP! could this be the case. From the tutorial online it
seems that the target of xpath predicate could be a eip:pipeline which
accepts In-Only or RobustInOnly. The error would make sense if the default
output of content-based router is always In-Out
hence the error from the pipeline.
I tried using ServicemixClient to send an In-Only exchange to the pipeline
from the Notify predicate rule but I ran into time-out exceptions because
the router always expects an output.
Could you please suggest how I could confront this problem. Thank you very
much. Please see the snippet of xbean.xml for servicemix-eip binding
component.
Regards
tefo
......
<!-- Content-based routing toward the CSS-Broker: route Notify, Subscribe
requests -->
<eip:content-based-router service="css:cssRouter"
endpoint="cssRouterEndpoint">
<eip:rules>
<eip:routing-rule>
<eip:predicate>
<eip:xpath-predicate xpath="//wsnt:Notify"
namespaceContext="#wnsContext" />
</eip:predicate>
<eip:target>
<eip:exchange-target service="css:notificaPipeline"
endpoint="endpoint" />
</eip:target>
</eip:routing-rule>
<!-- Subscriptions have to be persisted and forwareded to the
Broker -->
<eip:routing-rule>
<eip:predicate>
<eip:xpath-predicate xpath="//wsnt:Subscribe"
namespaceContext="#wnsContext" />
</eip:predicate>
<eip:target>
<eip:exchange-target service="css:persistenceRouteSlip"
endpoint="endpoint" />
</eip:target>
</eip:routing-rule>
<!-- default routing rule -->
<eip:routing-rule>
<eip:target>
<eip:exchange-target service="wsn:NotificationBroker"
endpoint="Broker" />
</eip:target>
</eip:routing-rule>
</eip:rules>
</eip:content-based-router>
<!-- First Validate the Schema of NotificaXML document and if valid forward
the NotificaXML
to the Broker else throw and error -->
<eip:static-routing-slip service="css:notificaSubTrigger"
endpoint="endpoint">
<eip:targets>
<!-- NB: First we inspect the exchange, if its the first Notify message
into the JBI, we load subscriptions from DB -->
<eip:exchange-target service="css:subscriptionsReloader"
endpoint="endpoint" />
<!-- validate Notify message using servicemix-validation component
-->
<eip:exchange-target service="css:CSSValidationService"
endpoint="NotificaValidationEndpoint" />
</eip:targets>
</eip:static-routing-slip>
<eip:pipeline service="css:notificaPipeline" endpoint="endpoint">
<eip:transformer>
<eip:exchange-target service="css:notificaSubTrigger" endpoint="endpoint"
/>
</eip:transformer>
<eip:target>
<eip:exchange-target service="wsn:NotificationBroker" endpoint="Broker"
/>
</eip:target>
</eip:pipeline>
.......
--
View this message in context: http://old.nabble.com/-servicemix-eip-%3A-content-based-router-and-pipeline-in-servicemix-3.x-tp28690640p28690640.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: [servicemix-eip]: content-based router and pipeline in
servicemix 3.x
Posted by iocanel <ca...@upstreamsystems.com>.
Hi,
Pipeline accept only InOnly exchanges, while recipientLists accept only
InOut.
The problem that you are having is that you send an InOut exchange to a
pipeline.
Either change the mep to InOnly, or change the pipeline to something else.
-----
Ioannis Canellos
http://iocanel.blogspot.com/ http://iocanel.blogspot.com/
--
View this message in context: http://old.nabble.com/-servicemix-eip-%3A-content-based-router-and-pipeline-in-servicemix-3.x-tp28690640p28696433.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.