We are using JBoss cluster with two nodes and JBoss Messaging 1.4.0 SP3 as our JMS provider. We are facing message delay issue in our production environment. Logs indicates that message has been put in the queue but on the consumer side they are not consumed. They delays are quite long (upto 9-10 hours) or on restart it get consumed. We are using spring (DefaultMessageListenerContainer) on the consumer side. Each queue has only one consumer attached
// Create the session Session jmsSession = jmsConnection.createSession(message.isTransacted(), Session.AUTO_ACKNOWLEDGE);
// Create the JMS message producer which will post messages to the // destination; MessageProducer messageProducer = jmsSession.createProducer(queue); if (message.isPersistent()) { messageProducer.setDeliveryMode(DeliveryMode.PERSISTENT); } else { messageProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); }