I want to post a follow-up with an update that this specific OOM was my own mistake. Even though I indeed was running my embedded broker on a separate VM number of times and commented out demo producer/consumer code, I forgot to comment out this line which came right after session creation, which is needed for an embedded broker to initialize:
MessageConsumer consumer = consumerSession.createConsumer(consumerSession.createTopic("amq.topic")); This created a consumer on my topic. And since defaults were used, Short.MAX_VALUE - 1 was used for non-persistent topic I used to stress test broker. Tens of thousands of 100Kb messages were immediately prefetched and filled up all the available heap, hence Out of Memory. - Art -- Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html