2 Replies Latest reply on Jan 5, 2003 12:08 PM by Adrian Brock

    Caching of messages

    Ben Cox Newbie

      Hello,
      How do I go about ensuring that my messages are not cached in JBossMQ? It seems the message cache grows no matter what I do. I have sent messages to a topic, somewhere on the order of a thousand of them in about 10 minutes. Every last one of them shows up and _stays_ in the message cache regardless of whether I set the timeToLive on the publisher or not. The messages are, of course, NON_PERSISTENT.
      I have tried using a Message Driven Bean to ensure that the messages were being read, but they continued to fill the cache, regardless. I really don't need caching, especially if it doesn't ever empty out. Where would I look in the source code to solve this problem?
      Thanks,

      Ben

        • 1. Re: Caching of messages
          Ben Cox Newbie

          Hello? Hello? Anyone there?

          This seemed like a simple enough question.... I wanted to hack out the solution myself, and downloaded the source (jboss-3.0.4-src.tgz). Nobody answered my forum query, so I figured I'd just figure it out.

          I assumed (badly, it turns out) that it would be the same source that were used to build the release with the same name (jboss-3.0.4.zip, downloaded from the same page). So, I went ahead and began to implement a timer that would go along and expire these messages from the cache when the expiration was reached. It only took a few hours of playing with the source to figure out where to put it.

          Lo and behold, when I ran my newly patched version of JBoss, I got errors saying that I can't remove an object from the message cache if it's not there. It took me a while to figure it out, but it turns out that the caching expired messages problem had been fixed in this version of JBoss, though it never made it into the version in jboss-3.0.4.zip!!

          I had some difficulty believing this, so I downloaded the source again, compiled, and deployed it. The problem was, in fact, gone. Then, I followed the same process with the zip file. Sure enough, the message cache went back to growing like mad.

          So, perhaps someone really is reading this forum, and can synch up the jboss-3.0.4.zip with jboss-3.0.4-src.tgz??

          Thanks,
          Ben

          • 2. Re: Caching of messages
            Adrian Brock Master

            Report it as a bug on sourceforge

            www.sf.net/projects/jboss

            Regards,
            Adrian