You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Matt Sicker <bo...@gmail.com> on 2014/06/26 22:44:09 UTC

What's the point of the OUT message on an Exchange?

I don't understand what the point of using the out message is. It doesn't
copy headers. It doesn't signify the end of a route as far as I can tell.
It's not used for a reply message. I don't think any of the official Camel
components even use the out message. What good is it for?

In my own project, I've created a final processor that copies the in
message to the out message and selectively fills in headers that were
configured for that processor. I don't even know why I do this other than
as a way to get rid of the myriad JMS headers that get passed around from
using JMS (and occasionally rogue HTTP headers returned from a SOAP call
somewhere).

Are there any good resources or explanations as to the point of the out
message? It seems to complicate things as it doesn't seem as though you can
send a dual-message of anything by using both the in and out messages.

-- 
Matt Sicker <bo...@gmail.com>

Re: What's the point of the OUT message on an Exchange?

Posted by David Karlsen <da...@gmail.com>.
Also note that there is a DSL mechanism to mangle propagation of headers:
http://camel.apache.org/how-to-avoid-sending-some-or-all-message-headers.html


2014-06-27 19:47 GMT+02:00 Matt Sicker <bo...@gmail.com>:

> Thank you, that actually helped quite a bit! I see that using the in
> message is just more convenient than copying headers all the time for an
> InOut chain.
>
>
> On 27 June 2014 00:44, Claus Ibsen <cl...@gmail.com> wrote:
>
> > Hi
> >
> > See this FAQ
> > http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
> >
> > If you have a copy of the Camel in Action book, see page 66 for more
> > details as well.
> >
> > On Thu, Jun 26, 2014 at 10:44 PM, Matt Sicker <bo...@gmail.com> wrote:
> > > I don't understand what the point of using the out message is. It
> doesn't
> > > copy headers. It doesn't signify the end of a route as far as I can
> tell.
> > > It's not used for a reply message. I don't think any of the official
> > Camel
> > > components even use the out message. What good is it for?
> > >
> > > In my own project, I've created a final processor that copies the in
> > > message to the out message and selectively fills in headers that were
> > > configured for that processor. I don't even know why I do this other
> than
> > > as a way to get rid of the myriad JMS headers that get passed around
> from
> > > using JMS (and occasionally rogue HTTP headers returned from a SOAP
> call
> > > somewhere).
> > >
> > > Are there any good resources or explanations as to the point of the out
> > > message? It seems to complicate things as it doesn't seem as though you
> > can
> > > send a dual-message of anything by using both the in and out messages.
> > >
> > > --
> > > Matt Sicker <bo...@gmail.com>
> >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > Red Hat, Inc.
> > Email: cibsen@redhat.com
> > Twitter: davsclaus
> > Blog: http://davsclaus.com
> > Author of Camel in Action: http://www.manning.com/ibsen
> > hawtio: http://hawt.io/
> > fabric8: http://fabric8.io/
> >
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Re: What's the point of the OUT message on an Exchange?

Posted by Matt Sicker <bo...@gmail.com>.
Thank you, that actually helped quite a bit! I see that using the in
message is just more convenient than copying headers all the time for an
InOut chain.


On 27 June 2014 00:44, Claus Ibsen <cl...@gmail.com> wrote:

> Hi
>
> See this FAQ
> http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
>
> If you have a copy of the Camel in Action book, see page 66 for more
> details as well.
>
> On Thu, Jun 26, 2014 at 10:44 PM, Matt Sicker <bo...@gmail.com> wrote:
> > I don't understand what the point of using the out message is. It doesn't
> > copy headers. It doesn't signify the end of a route as far as I can tell.
> > It's not used for a reply message. I don't think any of the official
> Camel
> > components even use the out message. What good is it for?
> >
> > In my own project, I've created a final processor that copies the in
> > message to the out message and selectively fills in headers that were
> > configured for that processor. I don't even know why I do this other than
> > as a way to get rid of the myriad JMS headers that get passed around from
> > using JMS (and occasionally rogue HTTP headers returned from a SOAP call
> > somewhere).
> >
> > Are there any good resources or explanations as to the point of the out
> > message? It seems to complicate things as it doesn't seem as though you
> can
> > send a dual-message of anything by using both the in and out messages.
> >
> > --
> > Matt Sicker <bo...@gmail.com>
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/
>



-- 
Matt Sicker <bo...@gmail.com>

Re: What's the point of the OUT message on an Exchange?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

See this FAQ
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

If you have a copy of the Camel in Action book, see page 66 for more
details as well.

On Thu, Jun 26, 2014 at 10:44 PM, Matt Sicker <bo...@gmail.com> wrote:
> I don't understand what the point of using the out message is. It doesn't
> copy headers. It doesn't signify the end of a route as far as I can tell.
> It's not used for a reply message. I don't think any of the official Camel
> components even use the out message. What good is it for?
>
> In my own project, I've created a final processor that copies the in
> message to the out message and selectively fills in headers that were
> configured for that processor. I don't even know why I do this other than
> as a way to get rid of the myriad JMS headers that get passed around from
> using JMS (and occasionally rogue HTTP headers returned from a SOAP call
> somewhere).
>
> Are there any good resources or explanations as to the point of the out
> message? It seems to complicate things as it doesn't seem as though you can
> send a dual-message of anything by using both the in and out messages.
>
> --
> Matt Sicker <bo...@gmail.com>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: What's the point of the OUT message on an Exchange?

Posted by Willem Jiang <wi...@gmail.com>.
As Camel wants to support the InOut(Request/Reply) and InOnly message exchange pattern at the same time.

If the previous exchange has no out message, camel pipe line processor which is used to chain all the processors together uses the in message to feed the other processor, but if previous exchange has the out message, it use the out message as the in message of the exchange to feed the next processor.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On June 27, 2014 at 4:44:38 AM, Matt Sicker (boards@gmail.com) wrote:
> I don't understand what the point of using the out message is. It doesn't
> copy headers. It doesn't signify the end of a route as far as I can tell.
> It's not used for a reply message. I don't think any of the official Camel
> components even use the out message. What good is it for?
>  
> In my own project, I've created a final processor that copies the in
> message to the out message and selectively fills in headers that were
> configured for that processor. I don't even know why I do this other than
> as a way to get rid of the myriad JMS headers that get passed around from
> using JMS (and occasionally rogue HTTP headers returned from a SOAP call
> somewhere).
>  
> Are there any good resources or explanations as to the point of the out
> message? It seems to complicate things as it doesn't seem as though you can
> send a dual-message of anything by using both the in and out messages.
>  
> --
> Matt Sicker  
>