If the event is exchange related (eg extends AbstractExchangeEvent)
then there is a getExchange method you can use to get the exchange,
and therefore access to the message body.

You may want to look at org.apache.camel.util.MessageHelper as it has
methods for grabbing the message body for logging (Camel uses this
internally)

On Sun, Jun 12, 2016 at 12:26 AM, redpower1989 <redpower1...@hotmail.com> wrote:
> Hello,
>
> i am new in camel. I am trying to use EventNotifierSupport to log details
> about exchange messages. I am trying to use getSource method to get the
> message body as a String but i get only the Exchange Id. Is there other way
> to get the String representation of exchange event?
>
> Thanks
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Log-message-body-with-EventNotifierSupport-tp5783910.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to