I have been facing this same exception as well. There are a number of parameters that can be set on a message before being sent by a MessageProducer. http://java.sun.com/j2ee/1.4/docs/api/javax/jms/MessageProducer.html I tried setting setPriority(0) and setTimeToLive(60000) (60 seconds). I was hoping these will alleviate the problem. But these things had absolutely no effect. In fact i dont think my setTimeToLive was even respected. The message Q kept growing and ultimately i got the same OutOfMemoryException.
Here us my activemq.xml file <!-- START SNIPPET: xbean --> <beans xmlns="http://activemq.org/config/1.0"> <broker useJmx="false"> <persistenceAdapter> <journaledJDBC journalLogFiles="5" dataDirectory="activemq-data"/> </persistenceAdapter> <transportConnectors> <transportConnector name="default" uri="tcp://localhost:62002" /> </transportConnectors> <networkConnectors> <networkConnector uri="static:(tcp://host1:62002,tcp://host2:62002,tcp://host3:62002)" failover="true"/> </networkConnectors> </broker> </beans> <!-- END SNIPPET: xbean --> -- View this message in context: http://www.nabble.com/Out-of-Memory---RC2-t1393354.html#a4093509 Sent from the ActiveMQ - User forum at Nabble.com.
