[jboss-user] [JBoss Messaging] - Message Delay (upto 9 hours) in JBoss Messaging 1.4.0 SP3 in JBoss cluster environment

Vijay Rawat do-not-reply at jboss.com
Fri Jul 30 08:00:19 EDT 2010

Vijay Rawat [http://community.jboss.org/people/vijayraw] created the discussion

"Message Delay (upto 9 hours) in JBoss Messaging 1.4.0 SP3 in JBoss cluster environment"

To view the discussion, visit: http://community.jboss.org/message/555175#555175


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
Our Message Sending Code looks like this :
public void writeToQueue(Queue queue, JmsMessage message) throws JMSException {
        LOG.info("Entering with queue " + queue);
        Connection jmsConnection = null;
        try {
            jmsConnection = connectionFactory.createConnection();
            // Create the session
            Session jmsSession = jmsConnection.createSession(message.isTransacted(),
            // Create the JMS message producer which will post messages to the
            // destination;
            MessageProducer messageProducer = jmsSession.createProducer(queue);
            if (message.isPersistent()) {
            } else {
            MapMessage mapMessage = jmsSession.createMapMessage();
            for (Map.Entry<String, String> entry : message.getMessage().entrySet()) {
                mapMessage.setString(entry.getKey(), entry.getValue());
            if (message.isTransacted()) {
        } catch (JMSException jex) {
            LOG.error(jex.getMessage(), jex);
            throw jex;
        } finally {
            if (jmsConnection != null) {
                try {
                } catch (JMSException ignore) {
                    LOG.error(ignore.getMessage(), ignore);
        LOG.info("Published a message to queue " + queue);
Attached are the Configuration Files for JBoss Messaging
Unfortunately I could not replicate this problem in our QA or local environment.
If anybody has faced this problem, and have workaround for this, Pls let me know.


Reply to this message by going to Community

Start a new discussion in JBoss Messaging at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100730/93ac245b/attachment-0001.html 

More information about the jboss-user mailing list