0 Replies Latest reply on Jul 30, 2010 7:59 AM by Vijay Rawat

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

    Vijay Rawat Newbie

      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.