You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Carlos Quiroz <ca...@nokia.com> on 2008/03/27 08:31:36 UTC

Camel creating lots of connections (Is it polling?)

Hi all

I'm testing camel with a very simple setup. I just have a bean that should
listen for messages in a certain queue. My route looks like this:

from("activemq:myqueue").to("bean:aBean");

When I do that I see that connections are created every one second more or
less and then discarded, so I'm guessing that polling is being used instead
of just listening for the messages. I also tried to change the bean part to
log:category and the same behaviour is seen.

My setup includes camel 1.2, amq 5.0 and spring 2.5.1 (I changed the spring
jar in amq to be spring 2.5.1).

Is this related to http://issues.apache.org/activemq/browse/CAMEL-163?

Any suggestions on how to fix this since this seems to me a huge overhead

Regards
Carlos Quiroz
-- 
View this message in context: http://www.nabble.com/Camel-creating-lots-of-connections-%28Is-it-polling-%29-tp16323313s22882p16323313.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel creating lots of connections (Is it polling?)

Posted by Carlos Quiroz <ca...@nokia.com>.
Hi Dominic

Yes, this happens right at the start, seeing lots of newly created
connections that are quickly disposed. However James note is right on the
money and I'm not getting lots of new connections now

Regards
Carlos


DominicTulley wrote:
> 
> Hi Carlos, are you seeing this even when the system is idle (no messages
> coming through)?
> I'm seeing a similar issue (but not identical) where a new connection is
> made for each message that passes through the camel routing (
> http://www.nabble.com/Getting-lots-of-TIME_WAIT-sockets-tt16119896s22882.html
> here ).
> 
> This is potentially related to the JIRA you mentioned, but James has tried
> to reproduced it and doesn't see the problem.  
> 
> -Dominic
> 
> 
> Carlos Quiroz wrote:
>> 
>> Hi all
>> 
>> I'm testing camel with a very simple setup. I just have a bean that
>> should listen for messages in a certain queue. My route looks like this:
>> 
>> from("activemq:myqueue").to("bean:aBean");
>> 
>> When I do that I see that connections are created every one second more
>> or less and then discarded, so I'm guessing that polling is being used
>> instead of just listening for the messages. I also tried to change the
>> bean part to log:category and the same behaviour is seen.
>> 
>> My setup includes camel 1.2, amq 5.0 and spring 2.5.1 (I changed the
>> spring jar in amq to be spring 2.5.1).
>> 
>> Is this related to http://issues.apache.org/activemq/browse/CAMEL-163?
>> 
>> Any suggestions on how to fix this since this seems to me a huge overhead
>> 
>> Regards
>> Carlos Quiroz
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Camel-creating-lots-of-connections-%28Is-it-polling-%29-tp16323313s22882p16324304.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel creating lots of connections (Is it polling?)

Posted by DominicTulley <do...@telelogic.com>.
Hi Carlos, are you seeing this even when the system is idle (no messages
coming through)?
I'm seeing a similar issue (but not identical) where a new connection is
made for each message that passes through the camel routing (
http://www.nabble.com/Getting-lots-of-TIME_WAIT-sockets-tt16119896s22882.html
here ).

This is potentially related to the JIRA you mentioned, but James has tried
to reproduced it and doesn't see the problem.  

-Dominic


Carlos Quiroz wrote:
> 
> Hi all
> 
> I'm testing camel with a very simple setup. I just have a bean that should
> listen for messages in a certain queue. My route looks like this:
> 
> from("activemq:myqueue").to("bean:aBean");
> 
> When I do that I see that connections are created every one second more or
> less and then discarded, so I'm guessing that polling is being used
> instead of just listening for the messages. I also tried to change the
> bean part to log:category and the same behaviour is seen.
> 
> My setup includes camel 1.2, amq 5.0 and spring 2.5.1 (I changed the
> spring jar in amq to be spring 2.5.1).
> 
> Is this related to http://issues.apache.org/activemq/browse/CAMEL-163?
> 
> Any suggestions on how to fix this since this seems to me a huge overhead
> 
> Regards
> Carlos Quiroz
> 

-- 
View this message in context: http://www.nabble.com/Camel-creating-lots-of-connections-%28Is-it-polling-%29-tp16323313s22882p16323942.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel creating lots of connections (Is it polling?)

Posted by Carlos Quiroz <ca...@nokia.com>.
Hi James

Yes, that did it. I still get a lot of messages from
DefaultMessageListenerContainer (I guess that ones polls anyway) but there
are no new connections created.

I'm looking forward to use camel 1.3

Regards and thanks
Carlos


James.Strachan wrote:
> 
> On 27/03/2008, Carlos Quiroz <ca...@nokia.com> wrote:
>>
>>  Hi all
>>
>>  I'm testing camel with a very simple setup. I just have a bean that
>> should
>>  listen for messages in a certain queue. My route looks like this:
>>
>>  from("activemq:myqueue").to("bean:aBean");
>>
>>  When I do that I see that connections are created every one second more
>> or
>>  less and then discarded, so I'm guessing that polling is being used
>> instead
>>  of just listening for the messages. I also tried to change the bean part
>> to
>>  log:category and the same behaviour is seen.
>>
>>  My setup includes camel 1.2, amq 5.0 and spring 2.5.1 (I changed the
>> spring
>>  jar in amq to be spring 2.5.1).
>>
>>  Is this related to http://issues.apache.org/activemq/browse/CAMEL-163?
>>
>>  Any suggestions on how to fix this since this seems to me a huge
>> overhead
> 
> This is resolved in 1.3.0 of Camel (which will hopefully be out real
> soon) so that it'll default to CACHE_CONSUMER.
> 
> The workaround is mentioned here (in the red box)
> http://activemq.apache.org/camel/jms.html
> 
> Set the cacheLevelName to "CACHE_CONSUMER" either on the
> ActiveMQComponent / JmsComponent or your endpoint URI
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://open.iona.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Camel-creating-lots-of-connections-%28Is-it-polling-%29-tp16323313s22882p16324303.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel creating lots of connections (Is it polling?)

Posted by James Strachan <ja...@gmail.com>.
On 27/03/2008, Carlos Quiroz <ca...@nokia.com> wrote:
>
>  Hi all
>
>  I'm testing camel with a very simple setup. I just have a bean that should
>  listen for messages in a certain queue. My route looks like this:
>
>  from("activemq:myqueue").to("bean:aBean");
>
>  When I do that I see that connections are created every one second more or
>  less and then discarded, so I'm guessing that polling is being used instead
>  of just listening for the messages. I also tried to change the bean part to
>  log:category and the same behaviour is seen.
>
>  My setup includes camel 1.2, amq 5.0 and spring 2.5.1 (I changed the spring
>  jar in amq to be spring 2.5.1).
>
>  Is this related to http://issues.apache.org/activemq/browse/CAMEL-163?
>
>  Any suggestions on how to fix this since this seems to me a huge overhead

This is resolved in 1.3.0 of Camel (which will hopefully be out real
soon) so that it'll default to CACHE_CONSUMER.

The workaround is mentioned here (in the red box)
http://activemq.apache.org/camel/jms.html

Set the cacheLevelName to "CACHE_CONSUMER" either on the
ActiveMQComponent / JmsComponent or your endpoint URI

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com