camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Naira & Kobo <>
Subject Camel Tracer impedes performance.
Date Thu, 17 Feb 2011 10:01:36 GMT


I noticed that extending the camel tracer to log exchange data into the
database impedes performance on the ESB.

I followed the example in the camel samples, where I defined a direct

<bean id="camelTracer"
	    	<property name="destination" ref="traceEndpoint"/>
	    	<property name="logLevel" value="OFF"/>

<osgi:camelContext xmlns=""
  	<endpoint id="traceEndpoint" uri="direct:traceRoute"/>
              <from ....../>
              <to ............./>
    	<from uri="direct:traceRoute"/>
      	<bean ref="tracer" method="Log"/>

What I did was to create a custom bean that logs this tracemessage to
database. I assume the process of calling this route is off the main route
(meaning I assume its like an interceptor and should not in any way slow
down the time it takes to travel from one node to another). But it seems it
does in reality. As whenever I turn of the custom trace, it takes
considerable  less time to complete a transaction and when its on, it takes
more time.

A background to this problem that might be helpful is the fact that,
exchange message body type is a bean (and not string or xml). I noticed each
time its going from one node to another, it implicitly tries to convert from
bean to String, before handling the message to the direct endpoint. (May be
its just my imagination)

It is also noteworthy that the main route uses vm and the preferred endpoint
uri while the log interfaces uses the direct uri.

Is there another way, I can efficiently do this?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message