this seems to be an incarnation of issue: https://issues.apache.org/activemq/browse/AMQ-2283 If you can add some detail and a simple test case to that issue it would be a great help. and vote for it also.
2009/6/11 ee7arh <andrew.hu...@2e-systems.com> > > Hi, > > I have a problem that my application runs out of memory after a few days. I > ran jconsole against it and notice that the threads are building up and up. > In the "Threads" section of jconsole, I see that the vast majority of > Threads are "Multicast Discovery Agent Notifier" so I think the problem is > related to this. > > My application uses ActiveMQ message broker and Camel router internally and > sends messages to other external message brokers which it discovers using > Multicast discovery. > > Here is an extract of the Spring configuration file (the application is > launched from Spring) > > <!-- ActiveMQ broker listening on port 61618 --> > <broker:broker useJmx="false" persistent="true" brokerName="localhost"> > > <broker:persistenceAdapter> > <broker:amqPersistenceAdapter > directory="../../activemq-data-eventgen" maxFileLength="32mb"/> > </broker:persistenceAdapter> > > <broker:transportConnectors> > <broker:transportConnector name="tcp" > uri="tcp://localhost:61618"/> > </broker:transportConnectors> > </broker:broker> > > > <!-- configure the Camel JMS consumer to use the ActiveMQ broker > declared above --> > <bean id="jmsExternal" > class="org.apache.camel.component.jms.JmsComponent"> > <property name="connectionFactory"> > <bean class="org.apache.activemq.ActiveMQConnectionFactory"> > <!-- use multicast to detect other broker - group=groupName > of network to look for --> > <property name="brokerURL" > > value="discovery:(multicast://default?group=testbroker)?initialReconnectDelay=100"/> > </bean> > </property> > </bean> > > To send a message to the external queue "jmsExternal" I call the method in > POJO object: > > camelTemplate.sendBody(x,y); > > Only thing I noticed in the logs is that every time my application wants to > send a message, it seems to rediscover the brokers each time and prints > them > out in the logs however I have no idea on the internal working of multicast > discovery so that could be completely normal. > > I am using activeMQ 5.2.0 but the brokers which are being discovered are > using the FUSE 5.3 version. > > If select one of the thousands of Multicast threads displayed in Jconsole, > they all have the same stack trace as this: > > Name: Multicast Discovery Agent Notifier > State: WAITING on > > java.util.concurrent.locks.abstractqueuedsynchronizer$conditionobj...@1ce7f98 > Total blocked: 0 Total waited: 1 > > Stack trace: > sun.misc.Unsafe.park(Native Method) > java.util.concurrent.locks.LockSupport.park(LockSupport.java:158) > > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925) > java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358) > > java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947) > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) > java.lang.Thread.run(Thread.java:619) > > > Help appreciated. > > BRegards > Andrew > -- > View this message in context: > http://www.nabble.com/Build-up-of-Threads-using-Multicast-Discovery-Agent---eventually-out-of-memory-tp23982888p23982888.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- http://blog.garytully.com Open Source Integration http://fusesource.com