On 17/02/2011 11:21, Naira & Kobo wrote:
Thanks a lot for your response.
Whats is the name of the default trace event handler used by camel tracer?
I 'd like to take a look at that class and see how I can optimize it.
I will actually prefer if messages intercepted and logged in a separate
thread form the main exchange thread. This way, the main exchange can keep
running without having to be blocked/impeded by the trace handler.
There isn't one.
Have a look at
org\apache\camel\processor\interceptor\TraceInterceptor.java (line 299+)
to see what happens, if there is a traceHandler it gets used otherwise
the default processing takes place.
You can replace the TraceInterceptor, but that's even more work 'cos the
interceptor does useful stuff (the TraceEventHandler is an opportunity
to use the useful stuff from the TraceInterceptor without having to copy
it).
If you want the processing on a different thread then I think you will
have to pay the price of copy the Exchange (which may not be a big
penalty in your case, I would expect that DB writes are the worst perf hit).
Jim