camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Carman <>
Subject Re: Taking a "snapshot" of an exchange...
Date Thu, 24 May 2012 15:16:17 GMT
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 <> 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

View raw message