camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Castyn <>
Subject Performance Issue when Sending Messages from Jetty to CXF
Date Thu, 15 Nov 2012 17:29:23 GMT
I have a bundle deployed in servicemix that has two routes within it.  1 is a
jetty route that sits on port 9191 and receives soap messages and routes
them to a CXF consumer in a different route, which then processes the
messages and sends to an external system and gets responses.  The second
route is the CXF consumer (on port 9192) which checks for errors and sends
to a CXF producer linked to the external web service.

When we do a load test with 10 transactions per second, looking at the logs,
I see that the jetty endpoint receives the messages 10 per second, but the
CXF endpoint lags behind.  Granted, the calls the CXF consumer/producer are
making to an external system can take up to 2 seconds, but I have increased
the worker threads within CXF and it seems to have no effect on the
throughput of the CXF route.  I have set the following so I am not sure why
the CXF consumer would not be getting more messages from the jetty endpoint.  

If I have the incoming SOAP messages go directly to the CXF endpoint instead
of the jetty listener, it processes them all and overall performs about 50%
faster.  What could be causing this performance hit between jetty and CXF?

    <bean id="cxf.default.workqueue"
	    <property name="name" value="default" />
	    <property name="lowWaterMark" value="20" />
        <property name="highWaterMark" value="50" />

The jetty listener that first receives the messages from the outside world

           <from uri="jetty:"/>
			<log message="Incoming gateway request" loggingLevel="INFO"/>
// This just evaluates the incoming URL and sets the dynamicEndpoint to
route to that endpoint (in this case it will just be to the CXF consumer
deployed in servicemix within the same camel context displayed below)
            <to uri="gatewayProcessor"></to>  
	        		<simple>${headers.dynamicEndpoint} == null</simple>
	        		<log message="Dynamic Endpoint not set, invalid url path"
		            <recipientList delimiter=",">

The CXF consumer / producer route and beans for both

		<route id="JavelinInitiateService">
	   		<from uri="cxf:bean:initiateCXFConsumer" />
	   		<log message="Incoming request for JavelinInitiateService"
			<to uri="cxf:bean:initiateCXFProducer"/>

                <entry key="dataFormat" value="MESSAGE"/>
                <entry key="receiveTimeout" value="60000"/>
                <entry key="connectionTimeout" value="60000"/>
               <entry key="schema-validation-enabled" value="true" />

// Link to external web service
			<entry key="dataFormat" value="MESSAGE"/>
    		<entry key="receiveTimeout" value="60000"/>
     		<entry key="connectionTimeout" value="60000"/>
     		<entry key="schema-validation-enabled" value="true" />

So what could be causing the delay in jetty sending messages to the CXF
listener in this case?  

To sum up the message path:
External System sends SOAP request ==> Jetty Route (port 9191) =lag=> CXF
Consumer (9192) ==> CXF Producer ==> External Web Service.

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

View raw message