0 Replies Latest reply on Jun 20, 2011 12:33 PM by robert.geisler

    how to avoid insertion of messages?

    robert.geisler Newbie

      hello everybody...

       

      last week we hit a problem with JBoss Java Messaging Service (JBoss 4.2.2 with JBossMQ)...

       

      our server was shut down and we just tried to start it. in the log files we noticed a warning about a transaction timeout during JBossMQ setup (please excuse me, i dont have the logs anymore). so we took a look at our database and we found 1,5 million records in table "JMSMessages". after removing all of these records (it took about 2,5 minutes), the server restarted successfully -without any error/ exceptions in the logs.

       

      since we emptied the table and restarted the server, it is running without any exceptions or errors. BUT: today we looked into table "JMSMessages" again and found ~1500 newly created records! so now we assume we will find these 1,5 million records in the table again soon!?

       

      a few example records:

       

      MESSAGEIDDESTINATIONTXIDTXOPMESSAGEBLOB
      54TOPIC[TOPICNAME]ID:24.-2147483648NULLT[BLOB]
      62TOPIC[TOPICNAME]ID:24.-2147483648NULLT[BLOB]
      69TOPIC[TOPICNAME]ID:24.-2147483648NULLT[BLOB]
      82TOPIC[TOPICNAME]ID:24.-2147483648NULLT[BLOB]
      .........
      ...
      600TOPIC[TOPICNAME]ID:24.-2147483648NULLT[BLOB]
      600TOPIC[TOPICNAME]ID:61.-2147483648NULLT[BLOB]
      601TOPIC[TOPICNAME]ID:24.-2147483648NULLT[BLOB]
      601TOPIC[TOPICNAME]ID:61.-2147483648NULLT[BLOB]

       

       

      i searched the forum and found this post . it says that

      • those messages are temporary messages (TXOP=T) that get persisted because message cache believes to be out of resources (as defaults of HighMemoryMark and MaxMemoryMark are 50 and 60mb)...!?
      • such temporary messages will be deleted on server restart...!?

       

      periodic server restarts are not a solution for us! so as i understand

      • we may solve our problem by modifying the memory marks of message cache:
        with higher marks message cache will probably not try to soften jms messages, thus not insert them into database.
      • assuming that we have 1024mb of maximum heap size...
        we should configure HighMemoryMark with 896mb and MaxMemoryMark with 968mb.
      • higher memory marks are not able to prevent JBossMQ from inserting records, because vm's heap may exceed these marks, too.
        so if JBossMQ again tries to delete 1,5 million records on server restart we are forced to remove them on our own!?

       

      please feel free to correct me if my statements are wrong.

      and please let me know if there are other configurations that should be considered.

       

      thanks in advance!

       

      regards

      robert