We also had a similar requirement for this in the past. I recommend to have
a look at the Tracer [1]. It's implemented as an interception strategy and
called between each processor invocation. There you can also find some
ideas how to limit the traced messages, configure the content, ...

I'm looking forward to SMX5 which may will support this out of the box...

[1] http://camel.apache.org/tracer.html

Best,
Christian

On Thu, May 24, 2012 at 5:16 PM, James Carman <ja...@carmanconsulting.com>wrote:

> Heck, I'm just glad to know that I'm not way off base!  I'm a bit new
> to camel (at least in the "real world"), so I'm glad I'm not doing
> something completely crazy. :)  Thanks for the sanity check, Hadrian.
>
> On Thu, May 24, 2012 at 11:10 AM, Hadrian Zbarcea <hzbar...@gmail.com>
> wrote:
> > Hi James,
> >
> > I had a similar need not long ago and two things are needed. One is a
> > wiretap, to do the logging while processing goes uninterrupted on the
> main
> > flow.
> >
> > The second is directly related to your question. I ended up using just
> the
> > in Message, thus losing the properties, but that was good enough for my
> > scenario.
> >
> > For the second part of your scenario, yes that would work, but then you'd
> > probably have to process the exchange from the body of the message
> somehow.
> >
> > I hope this helps,
> > Hadrian
> >
> >
> > On 05/24/2012 10:13 AM, James Carman wrote:
> >>
> >> Fellow Camel riders,
> >>
> >> First a little background about what I'm trying to do:
> >>
> >> We want to introduce "auditing" (looks similar to BAM) to our camel
> >> infrastructure.  The idea would be that we want to be able to see
> >> exactly what the exchange looks like at certain points in the route.
> >> So, my thinking was that I'd take a "snapshot" of the exchange in some
> >> way and place that on a JMS queue for some other process to pick up
> >> and write the pertinent information into the database.
> >>
> >> Now, my question:
> >>
> >> How exactly would you guys go about it?  I could introduce a new data
> >> structure that I can put on the queue.  Or, is there perhaps something
> >> already there that I can lean on.  For example, could I do:
> >>
> >> exchange.getIn().setBody(exchange.copy());
> >>
> >> Would that make it through JMS correctly?  Meaning, could I have
> >> another route on the other side of my queue that does:
> >>
> >> Exchange original = exchange.getIn().getBody(Exchange.class);
> >>
> >> Would that work?
> >>
> >> Perhaps I'm going about this all wrong? :)
> >>
> >> Any advice would be greatly appreciated.
> >>
> >> Thanks,
> >>
> >> James
>

Reply via email to