4 Replies Latest reply on Sep 10, 2013 7:21 PM by A Majewski

    Performance problems with Simple Expression Language in Camel

    A Majewski Newbie

      We facing a problem with Simple Expression Language as part of our camel routes. The usage of simple is decreasing the performance of the actual route.

      We using camel 2.10.0.redhat-60024. Could anybody please confirm if that is a known issue?


      I created a show case route to replicate this behavior. I would be happy to commit it all that to github if anybody is interested.




      <?xml version="1.0" encoding="UTF-8"?>


      <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

        xmlns:camel="http://camel.apache.org/schema/spring" xmlns:context="http://www.springframework.org/schema/context"










        <camelContext id="performance" xmlns="http://camel.apache.org/schema/spring">

          <route id="inputRoute">

            <from uri="dataset:input?preloadSize=10000" />

            <to uri="seda:inputQueue" />



          <route id="baseBenchmarkRoute">

            <from uri="seda:inputQueue?concurrentConsumers=8" />


            <to uri="log://?level=INFO&amp;groupInterval=1000&amp;groupDelay=1000&amp;groupActiveOnly=false" />

            <setHeader headerName="value">








            <inOnly uri="mock:outputQueue" />




        <bean id="input" class="com.performance.InputDataSet">

          <property name="size" value="10000" />







      InputDataSet.class used to




      public class InputDataSet extends DataSetSupport {


        protected Object createMessageBody(final long messageIndex) {

          String description = "name" + messageIndex;

          SimplePojo body = new SimplePojo();

          body.setValue("" + messageIndex);


          return body;







      I created test to verify the throughput of this route.





      @DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)


      public class PerformanceTest {




        protected ModelCamelContext context;



        @EndpointInject(uri = "mock:outputQueue")

        protected MockEndpoint mockOutput;




        public void performanceTest() throws Exception {




          mockOutput.setResultWaitTime(20000); // 10 seconds









      The average Throughput of this route is around 400 messages per second.

      Received: 400 new messages, with total 857 so far. Last group took: 1000 millis which is: 400 messages per second. average: 358.427



      After replacing the setHeader with a processor which performs same action the throughput increased to 700 messages per second. Does anybody else experience similar behavior?



      We are very suprised with poor performance of Simple Expression Language in camel.