activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Constantly adding and removing consumer
Date Fri, 14 Mar 2008 07:38:43 GMT
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 <mehdi.aitoufkir@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

Mime
View raw message