Hi All, I am using AMQ 4.1.1 but this issue can also be seen in 5.0
If a producer chooses to participate in a JMS transaction we found that AMQ will store all the messages in memory till producer calls commit (even if JMS_DELIVERY_MODE of each message is PERSISTENT and broker has persistence enabled) . So if we keep producing messages and the queue fills up before we commit then producer will run into a deadlock. Broker won't allow to produce more messages (as queue is full) and we won't call commit till we complete production (produce more). So if we want to produce a large number of messages in a JMS transaction (which might fill up the queue) we need to call commit in smaller batches (say after every 50 messages) but then this defeats the purpose of JMS transactions. For message size of 100KB a default AMQ queue was filling up within 300 messages (using JMX console we can see queue memory consumption to be 100% and we cannot produce any further). Is this behaviour expected ? Also how is a producer to know when the queue is nearly full so that it can call commit. Attached is a producer app which gets deadlocked after producing around 300 messages in both AMQ 4.1.1 and 5.0. java JMSAttributeProducer --msg-size=102400 --broker-url=tcp://dharti:61616 --max-produce-cnt=1000 --persistent=true --transacted=true http://www.nabble.com/file/p16721700/amq1.xml amq1.xml http://www.nabble.com/file/p16721700/JMSAttributeProducer.java JMSAttributeProducer.java -- View this message in context: http://www.nabble.com/JMS-transaction-deadlocks-producer-tp16721700s2354p16721700.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.