camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <>
Subject Re: New JMS connection being created for every message
Date Wed, 01 Aug 2012 20:33:14 GMT
Just to recap what we found today. The reason for the bad performance 
seems to be that camel polls for replies in the producer with a default
of 1000ms. Setting receiveTimeout=10 on the producer seems to speed up 
the route a lot.

After we found that your colleague also found that this is actually 
documented in the camel-jms documentation :-)
I added the relevant section below.

I am not really sure why the receiveTimeout really controls the polling 
but it works. In any case the option name looks a bit misleading. I 
guess pollingIntervall would
be more acurate.



        Request-reply over JMS and using a shared fixed reply queue

If you use a fixed reply queue when doing Request Reply 
<> over JMS as shown in the 
example below, then pay attention.


In this example the fixed reply queue named "bar" is used. By default 
Camel assumes the queue is shared when using fixed reply queues, and 
therefore it uses a JMSSelector to only pickup the expected reply 
messages (eg based on the JMSCorrelationID). See next section for 
exclusive fixed reply queues. That means its not as fast as temporary 
queues. You can speedup how often Camel will pull for reply messages 
using the receiveTimeout option. By default its 1000 millis. So to make 
it faster you can set it to 250 millis to pull 4 times per second as shown:


Notice this will cause the Camel to send pull requests to the message 
broker more frequent, and thus require more network traffic.
It is generally recommended to use temporary queues if possible.

Am 30.04.2012 15:52, schrieb weberj:
> No, the resource adapter is fine. I wrote a simple MDB that uses the RA and
> just echoes back a message to the reply Q. In the onMessage() call I create
> and close the connection. This MDB can handle 20 messages/s, whereas Camel
> handles only one.
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Christian Schneider

Open Source Architect
Talend Application Integration Division

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message