One Star

[resolved] How to use an InOnly data exchange pattern ?

Hi,
Environment : TOS for ESB 5.1.1.r84309, Windows XP
I'd like to use the InOnly data exchange pattern in Talend Mediation but I can't find a way to do this.
The use case is to receive an 'Event' message via a Cfx/Soap web service, add some dynamically generated headers, asynchronously enqueue message in ActiveMQ (that's where the InOnly pattern comes in) and return a OK response.
It looks like when routes are drawn between components, there is no choice but to use InOut patterns.
Is there a way to achieve InOnly patterns ?
Thanks
Fabrice
1 ACCEPTED SOLUTION

Accepted Solutions
Employee

Re: [resolved] How to use an InOnly data exchange pattern ?

Set the disableReplyTo option on the JMS endpoint in the Advances settings tab. See http://camel.apache.org/jms.html for a complete description of the many options for configuring JMS endpoints in Camel. here is a quick walk-through of what I believe is your intended route.
In general, the message exchange pattern (MEP) for your CXF route is InOut because it needs to send some kind of response back. As you can see on the referenced documentation page, when camel-jms component is used as a message producer (i.e. Camel "produces" a message which is put a message onto JMS ) the behavior depends on the MEP of the parent route. If the MEP of the parent route is InOut then Camel assumes by default that you want a InOut behavior on your JMS producer, so it sets up a temporary queue as the implicit ReplyTo queue and sits and waits for it before proceeding to the next step in your route.
In contrast, if the parent route is InOnly then the Camel JMS producer will act in a fire-and-forget mode, which is what you want in your case. However, we cannot change the MEP of the parent route because it needs to be InOut for CXF. Setting the options as described should do the trick.
2 REPLIES
Employee

Re: [resolved] How to use an InOnly data exchange pattern ?

Set the disableReplyTo option on the JMS endpoint in the Advances settings tab. See http://camel.apache.org/jms.html for a complete description of the many options for configuring JMS endpoints in Camel. here is a quick walk-through of what I believe is your intended route.
In general, the message exchange pattern (MEP) for your CXF route is InOut because it needs to send some kind of response back. As you can see on the referenced documentation page, when camel-jms component is used as a message producer (i.e. Camel "produces" a message which is put a message onto JMS ) the behavior depends on the MEP of the parent route. If the MEP of the parent route is InOut then Camel assumes by default that you want a InOut behavior on your JMS producer, so it sets up a temporary queue as the implicit ReplyTo queue and sits and waits for it before proceeding to the next step in your route.
In contrast, if the parent route is InOnly then the Camel JMS producer will act in a fire-and-forget mode, which is what you want in your case. However, we cannot change the MEP of the parent route because it needs to be InOut for CXF. Setting the options as described should do the trick.
One Star

Re: [resolved] How to use an InOnly data exchange pattern ?

Great ! Thanks for the help.
Fabrice