You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "david.la" <me...@gmail.com> on 2008/03/13 22:11:41 UTC

Constantly adding and removing consumer

Hi,

I'm using activemq with camel and when i turn the debug logs, I'm seeing
activity every second or so. It's adding and removing consumer.

I'd like to know what is that for may be i'm misconfiguring my activemq
because even if there is no external activity, it's still happening. 

I recently found that the advisory module was driving ActiveMQ to use more
and more memory and then crash. I disabled it. I want to make sure the
constant activity i'm seeing the logs will not result in the same kind of
issues.

The debug messages i'm seeing look like:

DEBUG AbstractRegion                 - Removing consumer:
ID:test.com-38805-1205442501944-3:2:1016:1
DEBUG AbstractRegion                 - Removing consumer:
ID:test.com-38805-1205442501944-3:1:1016:1
DEBUG AbstractRegion                 - Adding consumer:
ID:test.com-38805-1205442501944-3:1:1017:1
DEBUG AbstractRegion                 - Adding consumer:
ID:test.com-38805-1205442501944-3:2:1017:1
DEBUG AbstractRegion                 - Removing consumer:
ID:test.com-38805-1205442501944-3:2:1017:1
DEBUG AbstractRegion                 - Removing consumer:
ID:test.com-38805-1205442501944-3:1:1017:1
DEBUG AbstractRegion                 - Adding consumer:
ID:test.com-38805-1205442501944-3:2:1018:1
DEBUG AbstractRegion                 - Adding consumer:
ID:test.com-38805-1205442501944-3:1:1018:1
DEBUG AbstractRegion                 - Removing consumer:
ID:test.com-38805-1205442501944-3:1:1018:1
DEBUG AbstractRegion                 - Removing consumer:
ID:test.com-38805-1205442501944-3:2:1018:1
DEBUG AbstractRegion                 - Adding consumer:
ID:test.com-38805-1205442501944-3:1:1019:1
DEBUG AbstractRegion                 - Adding consumer:
ID:test.com-38805-1205442501944-3:2:1019:1
DEBUG AbstractRegion                 - Removing consumer:
ID:test.com-38805-1205442501944-3:1:1019:1
DEBUG AbstractRegion                 - Removing consumer:
ID:test.com-38805-1205442501944-3:2:1019:1
DEBUG AbstractRegion                 - Adding consumer:
ID:test.com-38805-1205442501944-3:2:1020:1
DEBUG AbstractRegion                 - Adding consumer:
ID:test.com-38805-1205442501944-3:1:1020:1
DEBUG AbstractRegion                 - Removing consumer:
ID:test.com-38805-1205442501944-3:1:1020:1
DEBUG AbstractRegion                 - Removing consumer:
ID:test.com-38805-1205442501944-3:2:1020:1
DEBUG AbstractRegion                 - Adding consumer:
ID:test.com-38805-1205442501944-3:2:1021:1
DEBUG AbstractRegion                 - Adding consumer:
ID:test.com-38805-1205442501944-3:1:1021:1

I have declared my camel routing (inside activemq.xml) as
 
---------------------------8ß-----------------------------
<camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring">
<!-- … à
          <route>
                   <from uri="activemq:Router"/>
                   <process ref="router"/>
</route>
<!-- … à
 </camelContext>
 
<bean id="router" class="myProcessor"/> 
---------------------------8ß-----------------------------
 
Where bean “myProcessor” class extends
“org.apache.camel.processor.DelegateProcessor”


-- 
View this message in context: http://www.nabble.com/Constantly-adding-and-removing-consumer-tp16038772s2354p16038772.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Constantly adding and removing consumer

Posted by James Strachan <ja...@gmail.com>.
This is a rather long story; the quick answer is, CacheLevelName
should be set to CACHE_CONSUMER then the problem goes away.

<from uri="activemq:Router?CacheLevelName=CACHE_CONSUMER"/>

The longer answer is due to a spring bug, Camel could no longer
default to using cache consumer to get transactional queue routing
(e.g. take from a queue, send to one or more JMS destinations in an
atomic transaction). So in 1.2.0 we had to default to not
caching/reusing consumers.

here's the thread describing the bug
http://www.nabble.com/please-vote-for-SPR-3890-to-improve-Camel%27s-JMS-support-for-both-JMS-transactions-and-efficiency-to13210355s22882.html#a13210355

we've now resolved this in trunk and it'll be resolved in 1.3.0 -
*providing* that you use Spring 2.5.1 or later
http://issues.apache.org/activemq/browse/CAMEL-294

Until then its maybe easier to configure your JMS component or
endpoint to force CacheLevelName to be CACHE_CONSUMER


On 13/03/2008, david.la <me...@gmail.com> wrote:
>
>  Hi,
>
>  I'm using activemq with camel and when i turn the debug logs, I'm seeing
>  activity every second or so. It's adding and removing consumer.
>
>  I'd like to know what is that for may be i'm misconfiguring my activemq
>  because even if there is no external activity, it's still happening.
>
>  I recently found that the advisory module was driving ActiveMQ to use more
>  and more memory and then crash. I disabled it. I want to make sure the
>  constant activity i'm seeing the logs will not result in the same kind of
>  issues.
>
>  The debug messages i'm seeing look like:
>
>  DEBUG AbstractRegion                 - Removing consumer:
>  ID:test.com-38805-1205442501944-3:2:1016:1
>  DEBUG AbstractRegion                 - Removing consumer:
>  ID:test.com-38805-1205442501944-3:1:1016:1
>  DEBUG AbstractRegion                 - Adding consumer:
>  ID:test.com-38805-1205442501944-3:1:1017:1
>  DEBUG AbstractRegion                 - Adding consumer:
>  ID:test.com-38805-1205442501944-3:2:1017:1
>  DEBUG AbstractRegion                 - Removing consumer:
>  ID:test.com-38805-1205442501944-3:2:1017:1
>  DEBUG AbstractRegion                 - Removing consumer:
>  ID:test.com-38805-1205442501944-3:1:1017:1
>  DEBUG AbstractRegion                 - Adding consumer:
>  ID:test.com-38805-1205442501944-3:2:1018:1
>  DEBUG AbstractRegion                 - Adding consumer:
>  ID:test.com-38805-1205442501944-3:1:1018:1
>  DEBUG AbstractRegion                 - Removing consumer:
>  ID:test.com-38805-1205442501944-3:1:1018:1
>  DEBUG AbstractRegion                 - Removing consumer:
>  ID:test.com-38805-1205442501944-3:2:1018:1
>  DEBUG AbstractRegion                 - Adding consumer:
>  ID:test.com-38805-1205442501944-3:1:1019:1
>  DEBUG AbstractRegion                 - Adding consumer:
>  ID:test.com-38805-1205442501944-3:2:1019:1
>  DEBUG AbstractRegion                 - Removing consumer:
>  ID:test.com-38805-1205442501944-3:1:1019:1
>  DEBUG AbstractRegion                 - Removing consumer:
>  ID:test.com-38805-1205442501944-3:2:1019:1
>  DEBUG AbstractRegion                 - Adding consumer:
>  ID:test.com-38805-1205442501944-3:2:1020:1
>  DEBUG AbstractRegion                 - Adding consumer:
>  ID:test.com-38805-1205442501944-3:1:1020:1
>  DEBUG AbstractRegion                 - Removing consumer:
>  ID:test.com-38805-1205442501944-3:1:1020:1
>  DEBUG AbstractRegion                 - Removing consumer:
>  ID:test.com-38805-1205442501944-3:2:1020:1
>  DEBUG AbstractRegion                 - Adding consumer:
>  ID:test.com-38805-1205442501944-3:2:1021:1
>  DEBUG AbstractRegion                 - Adding consumer:
>  ID:test.com-38805-1205442501944-3:1:1021:1
>
>  I have declared my camel routing (inside activemq.xml) as
>
>  ---------------------------8ß-----------------------------
>  <camelContext id="camel"
>  xmlns="http://activemq.apache.org/camel/schema/spring">
>  <!-- … à
>            <route>
>                     <from uri="activemq:Router"/>
>                     <process ref="router"/>
>  </route>
>  <!-- … à
>   </camelContext>
>
>  <bean id="router" class="myProcessor"/>
>  ---------------------------8ß-----------------------------
>
>  Where bean "myProcessor" class extends
>  "org.apache.camel.processor.DelegateProcessor"
>
>
>
>  --
>  View this message in context: http://www.nabble.com/Constantly-adding-and-removing-consumer-tp16038772s2354p16038772.html
>  Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


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

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

Re: Constantly adding and removing consumer

Posted by James Strachan <ja...@gmail.com>.
On 14/03/2008, Rob Davies <ra...@gmail.com> wrote:
>
>  On 13 Mar 2008, at 23:19, patrickjamesbarry wrote:
>
>  >
>  > I have seen this same behaviour an am interested in any info on this!
>  >
>  >
>  >
>  > david.la wrote:
>  >>
>  >> Hi,
>  >>
>  >> I'm using activemq with camel and when i turn the debug logs, I'm
>  >> seeing
>  >> activity every second or so. It's adding and removing consumer.
>  >>
>  >> I'd like to know what is that for may be i'm misconfiguring my
>  >> activemq
>  >> because even if there is no external activity, it's still happening.
>  >>
>  >> I recently found that the advisory module was driving ActiveMQ to
>  >> use more
>  >> and more memory and then crash. I disabled it. I want to make sure
>  >> the
>  >> constant activity i'm seeing the logs will not result in the same
>  >> kind of
>  >> issues.
>  >>
>  >> The debug messages i'm seeing look like:
>  >>
>  >> DEBUG AbstractRegion                 - Removing consumer:
>  >> ID:test.com-38805-1205442501944-3:2:1016:1
>  >> DEBUG AbstractRegion                 - Removing consumer:
>  >> ID:test.com-38805-1205442501944-3:1:1016:1
>  >> DEBUG AbstractRegion                 - Adding consumer:
>  >> ID:test.com-38805-1205442501944-3:1:1017:1
>  >> DEBUG AbstractRegion                 - Adding consumer:
>  >> ID:test.com-38805-1205442501944-3:2:1017:1
>  >> DEBUG AbstractRegion                 - Removing consumer:
>  >> ID:test.com-38805-1205442501944-3:2:1017:1
>  >> DEBUG AbstractRegion                 - Removing consumer:
>  >> ID:test.com-38805-1205442501944-3:1:1017:1
>  >> DEBUG AbstractRegion                 - Adding consumer:
>  >> ID:test.com-38805-1205442501944-3:2:1018:1
>  >> DEBUG AbstractRegion                 - Adding consumer:
>  >> ID:test.com-38805-1205442501944-3:1:1018:1
>  >> DEBUG AbstractRegion                 - Removing consumer:
>  >> ID:test.com-38805-1205442501944-3:1:1018:1
>  >> DEBUG AbstractRegion                 - Removing consumer:
>  >> ID:test.com-38805-1205442501944-3:2:1018:1
>  >> DEBUG AbstractRegion                 - Adding consumer:
>  >> ID:test.com-38805-1205442501944-3:1:1019:1
>  >> DEBUG AbstractRegion                 - Adding consumer:
>  >> ID:test.com-38805-1205442501944-3:2:1019:1
>  >> DEBUG AbstractRegion                 - Removing consumer:
>  >> ID:test.com-38805-1205442501944-3:1:1019:1
>  >> DEBUG AbstractRegion                 - Removing consumer:
>  >> ID:test.com-38805-1205442501944-3:2:1019:1
>  >> DEBUG AbstractRegion                 - Adding consumer:
>  >> ID:test.com-38805-1205442501944-3:2:1020:1
>  >> DEBUG AbstractRegion                 - Adding consumer:
>  >> ID:test.com-38805-1205442501944-3:1:1020:1
>  >> DEBUG AbstractRegion                 - Removing consumer:
>  >> ID:test.com-38805-1205442501944-3:1:1020:1
>  >> DEBUG AbstractRegion                 - Removing consumer:
>  >> ID:test.com-38805-1205442501944-3:2:1020:1
>  >> DEBUG AbstractRegion                 - Adding consumer:
>  >> ID:test.com-38805-1205442501944-3:2:1021:1
>  >> DEBUG AbstractRegion                 - Adding consumer:
>  >> ID:test.com-38805-1205442501944-3:1:1021:1
>  >>
>  >> I have declared my camel routing (inside activemq.xml) as
>  >>
>  >> ---------------------------8ß-----------------------------
>  >> <camelContext id="camel"
>  >> xmlns="http://activemq.apache.org/camel/schema/spring">
>  >> <!-- … à
>  >>           <route>
>  >>                    <from uri="activemq:Router"/>
>  >>                    <process ref="router"/>
>  >> </route>
>  >> <!-- … à
>  >>  </camelContext>
>  >>
>  >> <bean id="router" class="myProcessor"/>
>  >> ---------------------------8ß-----------------------------
>  >>
>  >> Where bean "myProcessor" class extends
>  >> "org.apache.camel.processor.DelegateProcessor"
>  >>
>  >>
>  >>
>  >
>  > --
>  > View this message in context: http://www.nabble.com/Constantly-adding-and-removing-consumer-tp16038772s2354p16040946.html
>  > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>  >
>
>
> I saw something similar too - its now fixed for my case in svn trunk

Thats probably because trunk now uses the latest snapshot of Camel
along with spring 2.5.1 which fixes the issue

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

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

Re: Constantly adding and removing consumer

Posted by Rob Davies <ra...@gmail.com>.
On 13 Mar 2008, at 23:19, patrickjamesbarry wrote:

>
> I have seen this same behaviour an am interested in any info on this!
>
>
>
> david.la wrote:
>>
>> Hi,
>>
>> I'm using activemq with camel and when i turn the debug logs, I'm  
>> seeing
>> activity every second or so. It's adding and removing consumer.
>>
>> I'd like to know what is that for may be i'm misconfiguring my  
>> activemq
>> because even if there is no external activity, it's still happening.
>>
>> I recently found that the advisory module was driving ActiveMQ to  
>> use more
>> and more memory and then crash. I disabled it. I want to make sure  
>> the
>> constant activity i'm seeing the logs will not result in the same  
>> kind of
>> issues.
>>
>> The debug messages i'm seeing look like:
>>
>> DEBUG AbstractRegion                 - Removing consumer:
>> ID:test.com-38805-1205442501944-3:2:1016:1
>> DEBUG AbstractRegion                 - Removing consumer:
>> ID:test.com-38805-1205442501944-3:1:1016:1
>> DEBUG AbstractRegion                 - Adding consumer:
>> ID:test.com-38805-1205442501944-3:1:1017:1
>> DEBUG AbstractRegion                 - Adding consumer:
>> ID:test.com-38805-1205442501944-3:2:1017:1
>> DEBUG AbstractRegion                 - Removing consumer:
>> ID:test.com-38805-1205442501944-3:2:1017:1
>> DEBUG AbstractRegion                 - Removing consumer:
>> ID:test.com-38805-1205442501944-3:1:1017:1
>> DEBUG AbstractRegion                 - Adding consumer:
>> ID:test.com-38805-1205442501944-3:2:1018:1
>> DEBUG AbstractRegion                 - Adding consumer:
>> ID:test.com-38805-1205442501944-3:1:1018:1
>> DEBUG AbstractRegion                 - Removing consumer:
>> ID:test.com-38805-1205442501944-3:1:1018:1
>> DEBUG AbstractRegion                 - Removing consumer:
>> ID:test.com-38805-1205442501944-3:2:1018:1
>> DEBUG AbstractRegion                 - Adding consumer:
>> ID:test.com-38805-1205442501944-3:1:1019:1
>> DEBUG AbstractRegion                 - Adding consumer:
>> ID:test.com-38805-1205442501944-3:2:1019:1
>> DEBUG AbstractRegion                 - Removing consumer:
>> ID:test.com-38805-1205442501944-3:1:1019:1
>> DEBUG AbstractRegion                 - Removing consumer:
>> ID:test.com-38805-1205442501944-3:2:1019:1
>> DEBUG AbstractRegion                 - Adding consumer:
>> ID:test.com-38805-1205442501944-3:2:1020:1
>> DEBUG AbstractRegion                 - Adding consumer:
>> ID:test.com-38805-1205442501944-3:1:1020:1
>> DEBUG AbstractRegion                 - Removing consumer:
>> ID:test.com-38805-1205442501944-3:1:1020:1
>> DEBUG AbstractRegion                 - Removing consumer:
>> ID:test.com-38805-1205442501944-3:2:1020:1
>> DEBUG AbstractRegion                 - Adding consumer:
>> ID:test.com-38805-1205442501944-3:2:1021:1
>> DEBUG AbstractRegion                 - Adding consumer:
>> ID:test.com-38805-1205442501944-3:1:1021:1
>>
>> I have declared my camel routing (inside activemq.xml) as
>>
>> ---------------------------8ß-----------------------------
>> <camelContext id="camel"
>> xmlns="http://activemq.apache.org/camel/schema/spring">
>> <!-- … à
>>           <route>
>>                    <from uri="activemq:Router"/>
>>                    <process ref="router"/>
>> </route>
>> <!-- … à
>>  </camelContext>
>>
>> <bean id="router" class="myProcessor"/>
>> ---------------------------8ß-----------------------------
>>
>> Where bean “myProcessor” class extends
>> “org.apache.camel.processor.DelegateProcessor”
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Constantly-adding-and-removing-consumer-tp16038772s2354p16040946.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

I saw something similar too - its now fixed for my case in svn trunk




cheers,

Rob

http://open.iona.com/ -Enterprise Open Integration
http://rajdavies.blogspot.com/




Re: Constantly adding and removing consumer

Posted by patrickjamesbarry <pa...@gmail.com>.
I have seen this same behaviour an am interested in any info on this!



david.la wrote:
> 
> Hi,
> 
> I'm using activemq with camel and when i turn the debug logs, I'm seeing
> activity every second or so. It's adding and removing consumer.
> 
> I'd like to know what is that for may be i'm misconfiguring my activemq
> because even if there is no external activity, it's still happening. 
> 
> I recently found that the advisory module was driving ActiveMQ to use more
> and more memory and then crash. I disabled it. I want to make sure the
> constant activity i'm seeing the logs will not result in the same kind of
> issues.
> 
> The debug messages i'm seeing look like:
> 
> DEBUG AbstractRegion                 - Removing consumer:
> ID:test.com-38805-1205442501944-3:2:1016:1
> DEBUG AbstractRegion                 - Removing consumer:
> ID:test.com-38805-1205442501944-3:1:1016:1
> DEBUG AbstractRegion                 - Adding consumer:
> ID:test.com-38805-1205442501944-3:1:1017:1
> DEBUG AbstractRegion                 - Adding consumer:
> ID:test.com-38805-1205442501944-3:2:1017:1
> DEBUG AbstractRegion                 - Removing consumer:
> ID:test.com-38805-1205442501944-3:2:1017:1
> DEBUG AbstractRegion                 - Removing consumer:
> ID:test.com-38805-1205442501944-3:1:1017:1
> DEBUG AbstractRegion                 - Adding consumer:
> ID:test.com-38805-1205442501944-3:2:1018:1
> DEBUG AbstractRegion                 - Adding consumer:
> ID:test.com-38805-1205442501944-3:1:1018:1
> DEBUG AbstractRegion                 - Removing consumer:
> ID:test.com-38805-1205442501944-3:1:1018:1
> DEBUG AbstractRegion                 - Removing consumer:
> ID:test.com-38805-1205442501944-3:2:1018:1
> DEBUG AbstractRegion                 - Adding consumer:
> ID:test.com-38805-1205442501944-3:1:1019:1
> DEBUG AbstractRegion                 - Adding consumer:
> ID:test.com-38805-1205442501944-3:2:1019:1
> DEBUG AbstractRegion                 - Removing consumer:
> ID:test.com-38805-1205442501944-3:1:1019:1
> DEBUG AbstractRegion                 - Removing consumer:
> ID:test.com-38805-1205442501944-3:2:1019:1
> DEBUG AbstractRegion                 - Adding consumer:
> ID:test.com-38805-1205442501944-3:2:1020:1
> DEBUG AbstractRegion                 - Adding consumer:
> ID:test.com-38805-1205442501944-3:1:1020:1
> DEBUG AbstractRegion                 - Removing consumer:
> ID:test.com-38805-1205442501944-3:1:1020:1
> DEBUG AbstractRegion                 - Removing consumer:
> ID:test.com-38805-1205442501944-3:2:1020:1
> DEBUG AbstractRegion                 - Adding consumer:
> ID:test.com-38805-1205442501944-3:2:1021:1
> DEBUG AbstractRegion                 - Adding consumer:
> ID:test.com-38805-1205442501944-3:1:1021:1
> 
> I have declared my camel routing (inside activemq.xml) as
>  
> ---------------------------8ß-----------------------------
> <camelContext id="camel"
> xmlns="http://activemq.apache.org/camel/schema/spring">
> <!-- … à
>           <route>
>                    <from uri="activemq:Router"/>
>                    <process ref="router"/>
> </route>
> <!-- … à
>  </camelContext>
>  
> <bean id="router" class="myProcessor"/> 
> ---------------------------8ß-----------------------------
>  
> Where bean “myProcessor” class extends
> “org.apache.camel.processor.DelegateProcessor”
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Constantly-adding-and-removing-consumer-tp16038772s2354p16040946.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.