1 Reply Latest reply on Nov 23, 2012 5:47 AM by inspector

    Deleting unreferenced Message

    inspector Newbie

      Hi everybody,

       

      I was setting up a live-backup pair based on an AS7.1. I have an MDB deployed on the JBoss with the HornetQ Live but not on the JBoss with the HornetQ Backup. And I have a remote JMS-Producer for the queue of the MDB. Well, when I kill the Live failover seems to happen, as the JMS-Producer continues to send messages. If I then restart the previous Live it first announces itself as backup and then gets live again.

       

      But I'm missing messages. The messages send to the backup while the live was down do not get delivered. But as I restart the live JBoss I see them beeing deleted as the journal is loaded:

       

      10:58:30,555 INFO  [org.hornetq.core.server.cluster.impl.ClusterConnectionImpl] (Thread-0 (HornetQ-server-HornetQServerImpl::serverUUID=82076709-3499-11e2-acd2-37b95c4c6ab2-1241031933)) backup announced
      10:58:32,753 INFO  [org.hornetq.core.server.impl.FileLockNodeManager] (MSC service thread 1-3) Waiting to obtain live lock
      10:58:33,443 WARN  [org.hornetq.core.protocol.core.impl.RemotingConnectionImpl] (Thread-1 (HornetQ-client-global-threads-1316958553)) Connection failure has been detected: The connection was disconnected because of server shutdown [code=4]
      10:58:33,754 INFO  [org.hornetq.core.server.impl.FileLockNodeManager] (MSC service thread 1-3) Live Server Obtained live lock
      10:58:33,945 WARN  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Message for queue 4 which does not exist. This message will be ignored.
      10:58:33,946 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1130 from the journal
      10:58:33,946 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1128 from the journal
      10:58:33,946 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1129 from the journal
      10:58:33,947 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1126 from the journal
      10:58:33,947 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1127 from the journal
      10:58:33,947 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1124 from the journal
      10:58:33,947 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1125 from the journal
      10:58:33,947 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1122 from the journal
      10:58:33,947 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1123 from the journal
      10:58:33,948 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1120 from the journal
      10:58:33,948 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1121 from the journal
      10:58:33,948 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1117 from the journal
      10:58:33,948 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1116 from the journal
      10:58:33,948 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1119 from the journal
      10:58:33,948 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1118 from the journal
      10:58:33,949 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1113 from the journal
      10:58:33,949 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1115 from the journal
      10:58:33,949 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Deleting unreferenced message id=1114 from the journal
      10:58:33,990 WARN  [org.hornetq.core.client.impl.ClientSessionFactoryImpl] (Thread-1 (HornetQ-client-global-threads-1316958553)) Failed to connect to server.
      10:58:34,003 INFO  [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-3) Started Netty Acceptor version 3.2.6.Final-redhat-1-20df069 127.0.0.1:5445 for CORE protocol
      10:58:34,017 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-3) Server is now live
      10:58:34,017 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-3) HornetQ Server version 2.2.16.Final (HQ_2_2_16_FINAL, 122) [82076709-3499-11e2-acd2-37b95c4c6ab2]) started
      

       

      I appended the configuration for the live. The configuration for the backup is exactly the same except of <backup>false</backup>.

        • 1. Re: Deleting unreferenced Message
          inspector Newbie

          Ok, we've found the solution now. We were confused about the documentation and thought it would suffice to let the live and backup share their journal-directory, but acutally they need to share the bindigs-, large-messages- and paging-directory too.

           

          <journal-directory path="tmp/journal"  relative-to="user.home"/>
          <bindings-directory  path="tmp/bindings"  relative-to="user.home"/>
          <large-messages-directory path="tmp/large-message"  relative-to="user.home"/>
          <paging-directory path="tmp/paging"  relative-to="user.home"/>