0 Replies Latest reply on Jan 13, 2005 5:05 PM by trickard

    Unreadable messages JDBC3 Persistence Manager

    trickard

      It appears that any message left in a topic when jboss is shutdown will never be sent by the system. It appears in the message count in the jmx console but if mq must go back and load it from storage the message will never be sent to a receiver. When a subscriber connects with the appropriate clientID and subscription name if an internal ref to the message does not exist PersistenceMgr.loadFromStorage reads the jms_message_log table using keys messageid and destination. The destination value for topic messages with durable subscribers is '*' in jms_message_log.

       try
       {
       c = this.getConnection();
       stmt = c.prepareStatement(SELECT_MESSAGE);
       stmt.setLong(1, messageRef.messageId);
       System.out.println("x" + messageReg.getPersistnen
      
       stmt.setString(2, messageRef.getPersistentKey());
      
       rs = stmt.executeQuery();
       if (rs.next())
       return extractMessage(rs, 2);
      
       return null;
      





      The messageRef.getPersistentKey returns the destination from jms_reference_log (clientid, name, and selector), the row is never found and the function returns null.

      This also blocks any new messages that are added after the startup.


      Messages written to topics with durable subscribers that are read before a shutdown work fine as the system has a ref of some sort and does not attempt to load from storage.



      Is there a patch that makes this work anywhere that anyone knows of or should I just switch to JDBC2 which does not include the jms_reference_log table and hopefully works on restart