You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by dellekappa <gi...@codin.it> on 2007/11/19 16:56:31 UTC
using wiretap inside static routing slip flow
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.
RE: using wiretap inside static routing slip flow
Posted by dellekappa <gi...@codin.it>.
Solved!
Has been my fault,
the error was generated cause the wiretap was invoked also by another eip
havin a robost-in-only mep, before the static routing slip invocation.
Sorry for my mistake and thanks again for your help
dellekappa wrote:
>
>
> bvkeirsb wrote:
>>
>> The EIP wiretap doesn't support InOut, only InOnly/RobustInOnly I
>> believe (going from memory here). You won't be able to use the wiretap
>> as an InOut.
>>
>
> Thanks for answer.
> I guess it should support the in-out mep, as I can read in documentation:
>
> A WireTap component can be used to forward a copy of the input message to
> a listener in a proxy fashion.
> This component implements the WireTap pattern.
> It can handle all four standard MEPs, but will only send an In-Only MEP to
> the listener.
> The originating service must be configured to send messages to the WireTap
> directly.
> In the case of an In-Out MEP, this means that the WireTap needs to be
> configured to send the exchange along to the destination service.
>
> Yes, your workaround is valid, but anyway I would know if this could be an
> issue, for future implementations.
>
> Thanks
>
>
> bvkeirsb wrote:
>>
>> Maybe you'd want to wrap your echo endpoint into a pipeline?
>>
>> Wiretap (inonly) --> pipeline (inonly --> inout - this would be your
>> echo, or potentially a static routing slip or so --> inonly) --> final
>> endpoint (inonly)
>>
>> Bart Vankeirsbilck
>> -----Original Message-----
>> From: dellekappa [mailto:giulioruggeri@codin.it]
>> Sent: Monday, November 19, 2007 10:57 AM
>> To: users@servicemix.apache.org
>> Subject: using wiretap inside static routing slip flow
>>
>>
>> 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(Messa
>> geExchangeImpl.java:357)
>> at
>> org.apache.servicemix.jbi.util.MessageUtil.transferTo(MessageUtil.java:1
>> 21)
>> at
>> org.apache.servicemix.jbi.util.MessageUtil.transferToOut(MessageUtil.jav
>> a:107)
>> at
>> org.apache.servicemix.jbi.util.MessageUtil.transferInToOut(MessageUtil.j
>> ava: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(AsyncBaseLifeC
>> ycle.java:538)
>> at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas
>> eLifeCycle.java:490)
>> at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc
>> le.java:46)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D
>> eliveryChannelImpl.java:610)
>> at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j
>> ava: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:1
>> 34)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
>> r.java:650)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
>> va: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-tf48
>> 37197s12049.html#a13838679
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/using-wiretap-inside-static-routing-slip-flow-tf4837197s12049.html#a13855546
Sent from the ServiceMix - User mailing list archive at Nabble.com.
RE: using wiretap inside static routing slip flow
Posted by dellekappa <gi...@codin.it>.
bvkeirsb wrote:
>
> The EIP wiretap doesn't support InOut, only InOnly/RobustInOnly I
> believe (going from memory here). You won't be able to use the wiretap
> as an InOut.
>
Thanks for answer.
I guess it should support the in-out mep, as I can read in documentation:
A WireTap component can be used to forward a copy of the input message to a
listener in a proxy fashion.
This component implements the WireTap pattern.
It can handle all four standard MEPs, but will only send an In-Only MEP to
the listener.
The originating service must be configured to send messages to the WireTap
directly.
In the case of an In-Out MEP, this means that the WireTap needs to be
configured to send the exchange along to the destination service.
Yes, your workaround is valid, but anyway I would know if this could be an
issue, for future implementations.
Thanks
bvkeirsb wrote:
>
> Maybe you'd want to wrap your echo endpoint into a pipeline?
>
> Wiretap (inonly) --> pipeline (inonly --> inout - this would be your
> echo, or potentially a static routing slip or so --> inonly) --> final
> endpoint (inonly)
>
> Bart Vankeirsbilck
> -----Original Message-----
> From: dellekappa [mailto:giulioruggeri@codin.it]
> Sent: Monday, November 19, 2007 10:57 AM
> To: users@servicemix.apache.org
> Subject: using wiretap inside static routing slip flow
>
>
> 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(Messa
> geExchangeImpl.java:357)
> at
> org.apache.servicemix.jbi.util.MessageUtil.transferTo(MessageUtil.java:1
> 21)
> at
> org.apache.servicemix.jbi.util.MessageUtil.transferToOut(MessageUtil.jav
> a:107)
> at
> org.apache.servicemix.jbi.util.MessageUtil.transferInToOut(MessageUtil.j
> ava: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(AsyncBaseLifeC
> ycle.java:538)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas
> eLifeCycle.java:490)
> at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc
> le.java:46)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D
> eliveryChannelImpl.java:610)
> at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j
> ava: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:1
> 34)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
> r.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
> va: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-tf48
> 37197s12049.html#a13838679
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
>
--
View this message in context: http://www.nabble.com/using-wiretap-inside-static-routing-slip-flow-tf4837197s12049.html#a13854503
Sent from the ServiceMix - User mailing list archive at Nabble.com.
RE: using wiretap inside static routing slip flow
Posted by Bart Vankeirsbilck <ba...@bricsnet.com>.
The EIP wiretap doesn't support InOut, only InOnly/RobustInOnly I
believe (going from memory here). You won't be able to use the wiretap
as an InOut.
Maybe you'd want to wrap your echo endpoint into a pipeline?
Wiretap (inonly) --> pipeline (inonly --> inout - this would be your
echo, or potentially a static routing slip or so --> inonly) --> final
endpoint (inonly)
Bart Vankeirsbilck
-----Original Message-----
From: dellekappa [mailto:giulioruggeri@codin.it]
Sent: Monday, November 19, 2007 10:57 AM
To: users@servicemix.apache.org
Subject: using wiretap inside static routing slip flow
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(Messa
geExchangeImpl.java:357)
at
org.apache.servicemix.jbi.util.MessageUtil.transferTo(MessageUtil.java:1
21)
at
org.apache.servicemix.jbi.util.MessageUtil.transferToOut(MessageUtil.jav
a:107)
at
org.apache.servicemix.jbi.util.MessageUtil.transferInToOut(MessageUtil.j
ava: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(AsyncBaseLifeC
ycle.java:538)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas
eLifeCycle.java:490)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc
le.java:46)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D
eliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j
ava: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:1
34)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
r.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va: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-tf48
37197s12049.html#a13838679
Sent from the ServiceMix - User mailing list archive at Nabble.com.