You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by fbarbat <fb...@gmail.com> on 2013/04/20 00:20:02 UTC

Log sent messages

In a Request-Reply context, I want to log an outgoing message after it is
sent. I could do something like:

from("direct:start").to("netty:tcp:...).to("log:logSent?showAll=true&multiline=true")

But I would be logging the response. On the other hand, if the route is like
this:

from("direct:start").to("log:logSent?showAll=true&multiline=true").to("netty:tcp:...") 

It would be logging the message before it is sent and maybe the message was
not sent because of network problems. Is there an elegant way to solve this
in Camel?

Thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/Log-sent-messages-tp5731164.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Log sent messages

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

You can take a look at the event notifier
http://camel.apache.org/eventnotifier-to-log-details-about-all-sent-exchanges.html

There is events for sending and sent. So you have before and after.




On Sat, Apr 20, 2013 at 12:20 AM, fbarbat <fb...@gmail.com> wrote:
> In a Request-Reply context, I want to log an outgoing message after it is
> sent. I could do something like:
>
> from("direct:start").to("netty:tcp:...).to("log:logSent?showAll=true&multiline=true")
>
> But I would be logging the response. On the other hand, if the route is like
> this:
>
> from("direct:start").to("log:logSent?showAll=true&multiline=true").to("netty:tcp:...")
>
> It would be logging the message before it is sent and maybe the message was
> not sent because of network problems. Is there an elegant way to solve this
> in Camel?
>
> Thanks.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Log-sent-messages-tp5731164.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen