Great writeup of your problem.

First off, ignore enqueue count on Topics; the number is purely "advisory". 
Topics never store messages - only Queues and Topic Subscriptions store
messages.  You can see this via JMX: Queues have a QueueSize attribute, and
Topic Subscriptions have a PendingQueueSize attribute which tell the number
of stored messages.

That leaves the producer count.  That's likely your problem, so it should be
easy to track down.  I suspect there's a createProducer() call somewhere at
the message-handling level.

What technology are you using for your ActiveMQ client?  JMS?  Camel? 
Spring DMLC? ...

If JMS, finding the problem is a simple matter of reviewing the code to see
where createProducer() is being called, and finding a way to move that "up"
in the logic so it only happens once and the producer is reused.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/activemq-broker-running-out-of-heap-memory-tp4678656p4678659.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to