camel-users mailing list archives

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

Hi,

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
endpoint

<bean id="camelTracer"
class="org.apache.camel.processor.interceptor.Tracer">
	    	<property name="destination" ref="traceEndpoint"/>
	    	<property name="logLevel" value="OFF"/>
	</bean>	

<osgi:camelContext xmlns="http://camel.apache.org/schema/spring"
trace="true">   
  	<endpoint id="traceEndpoint" uri="direct:traceRoute"/>
  	
        <route>
              <from ....../>
               ...............
              <to ............./>
        </route>
    
	<route>
    	<from uri="direct:traceRoute"/>
      	<bean ref="tracer" method="Log"/>
    </route>  
  </osgi:camelContext>

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?

kr.
-- 
View this message in context: http://camel.465427.n5.nabble.com/Camel-Tracer-impedes-performance-tp3389173p3389173.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message