Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-4863

Using <threads>/threads() is ALOT slower than using the seda:endpoint

    XMLWordPrintableJSON

Details

    • Unknown

    Description

      Snippets from my routing file:

      <threads maxPoolSize="10" maxQueueSize="10">
         <to uri="jms:queue:testQueue?deliveryPersistent=true"/>
      </threads>
      

      compared to:

      <to uri="seda:test?concurrentConsumers=10&size=10"/>
      
      <from uri="seda:test?concurrentConsumers=10&size=10"/>
      <to uri="jms:queue:testQueue?deliveryPersistent=true"/>
      

      Using <threads> I get about 600 requests/per second.
      Using seda endpoint I get about 3000 requests/per second.

      Looking at the thread pools created by Camel in jconsole: I can see that the one created by <threads> is mostly idle as compared to the one created by the seda endpoint which is always busy.

      Also in the MBean Camel creates for it's managed thread pools, for the ThreadPool created by <threads> the TaskQueueSize attribute is almost always 0 and never more than 1. This is in contrast to the TaskQueueSize attribute on ThreadPool created by the seda endpoint which is always 10 (the seda queue size, and obviously until all the tasks have completed).

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            aaronjwhiteside Aaron Whiteside
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: