camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niels <>
Subject ExchangePatterns ?
Date Thu, 15 Aug 2013 09:14:15 GMT
Hey there,

I've been playing around with the different ExchangePatterns but couldn't
figure out 100% how they work. 

I'm assuming that ExchangePatterns are set on a Exchange based level. But
during my investigation on the message headers I couldn't find the property
for the ExchangePattern (I examined the message headers using AMQ Webconsole
so I'm only 99% sure I got so see them all). I can also rule out Route based
level because I examined the routes using JConsole and couldn't find any
reference to ExchangePattern.

Assuming they are set on a Exchange I'm wondering why I can't change the
them in different routes.
I'm trying to do something like this:

	<from uri="jetty:"/>
	<setExchangePattern pattern="InOnly"/>
	<to uri="activemq:in_http_1d3329c4-e516-4ac6-b086-c9d696f21208" />
	<from uri="activemq:in_http_1d3329c4-e516-4ac6-b086-c9d696f21208"/>
	<setExchangePattern pattern="InOut"/>
	<setHeader headerName="CamelHttpMethod">
	<to uri=""/>
	<to uri="activemq:in_http_af1f4dea-8299-4132-8640-1fa29234945c"/>
	<from uri="activemq:in_http_af1f4dea-8299-4132-8640-1fa29234945c"/>

I expose a Jetty http endpoint where people can post to, they don't care
about the response just sending back a 200 is fine here. That's why I use
the In Only exchange pattern works fine.

Now the next route I'm posting to another http service but in contrary to
the first route I want to capture the response and pass it on. Since the
ExchangePattern is set on an Exchange I would assume setting it back to
default InOut would enable me to capture the http response. However that's
not the case!

I'm confused over here, could anybody explain to me if I'm right?
Or could suggest another solution to my problem?

Niels Stevens

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message