13 Replies Latest reply on Dec 4, 2002 11:32 AM by Clarnace Howatt

    Topic w/ selector message cache problem

    Greg Leichner Newbie

      Environment info:
      o JBoss 3.0.0/Tomcat 4.0.3 and JBoss 3.0.1/Tomcat 4.0.4
      o A single publisher to a non transacted, auto acked, non persistent, non durable topic:
      topicSession = topicConnection.createTopicSession( false, Session.AUTO_ACKNOWLEDGE );
      topicPublisher.setDeliveryMode( DeliveryMode.NON_PERSISTENT );
      o I am using a single String property as a selector.
      o MessageCache attributes set to:
      o VM heap max set to: -Xmx256m

      Description of problem:
      When running a single publisher, and a single subscriber using the same property name and value as the selector, everything seems to work fine, no message caching occurs as expected.

      However, as soon as I start a second subscriber that uses a different property value on the selector, then JBoss starts to cache the messages and never lets them go. Eventually, I get into the same state as other people have described where it reaches the maximum memory cache and then starts writing things to disk, slowing things down to a crawl.

      The main point here is that by merely adding a subscriber using a different selector, the JBoss JMS server starts caching messages that shouldn't be delivered to any subscriber. Both JBoss 3.0.0 and 3.0.1 exhibit the same behavior.

      Has anybody else seen this and is there a workaround?

      I can provide the test code (very short) if necessary.

      Thanks for the help,