Hi,
I'm trying to configure an eip wiretap inside a static routing slip flow.
The wiretap is not the last endpoint of static routing slip flow, so I build
an "echo" endpoint (servicemix-bean), has its target-exchange, that simply
sends back the message received, in order to let the wiretap using an in-out
mep.
My configuration is as follow:
<eip:static-routing-slip service="tns:Service" endpoint="flow-routing">
<eip:targets>
<eip:exchange-target service="tns:Service"
endpoint="first_endpoint" />
<eip:exchange-target service="tns:Service"
endpoint="trace_endpoint" />
<eip:exchange-target service="tns:Anagrafica"
endpoint="last_endpoint" />
</eip:targets>
</eip:static-routing-slip>
<eip:wire-tap service="tns:Service" endpoint="trace-endpoint">
<eip:target>
<eip:exchange-target service="tns:Service" endpoint="echo-endpoint"/>
</eip:target>
<eip:inListener>
<eip:exchange-target service="tns:Service" endpoint="trace-queue" />
</eip:inListener>
</eip:wire-tap>
and this is the code inside the echo component:
public class MessageEchoBean implements MessageExchangeListener {
@Resource
private DeliveryChannel channel;
public void onMessageExchange(MessageExchange exchange) throws
MessagingException {
if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
MessageUtil.transferInToOut(exchange, exchange);
channel.send(exchange);
}
}
but I get thi error at runtime:
ERROR - BeanComponent - Error processing exchange
RobustInOnly[
id: ID:10.2.132.34-1165892ac50-8:2
status: Active
role: provider
service: {http://myorganization.namespace}Service
endpoint: echo-endpoint
in: mymessagexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
]
javax.jbi.messaging.MessagingException: Out not supported
at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setMessage(MessageExchangeImpl.java:357)
at
org.apache.servicemix.jbi.util.MessageUtil.transferTo(MessageUtil.java:121)
at
org.apache.servicemix.jbi.util.MessageUtil.transferToOut(MessageUtil.java:107)
at
org.apache.servicemix.jbi.util.MessageUtil.transferInToOut(MessageUtil.java:103)
at
codin.sismed.coop.util.MessageEchoBean.onMessageExchange(MessageEchoBean.java:21)
at
org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:224)
at
org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:200)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
It seems that the wiretap sends a Robust-In-Only exchange to the
BeanComponent.
As I understand, all the components inside a static rouintg slip should use
an in-out mep, and
looking at the documentation the wiretap should support the in-out mep, but
I cannot find a way make it work. Am I missing something?
Any suggestion would be appreciated
Thanks
Giulio
--
View this message in context:
http://www.nabble.com/using-wiretap-inside-static-routing-slip-flow-tf4837197s12049.html#a13838679
Sent from the ServiceMix - User mailing list archive at Nabble.com.