4 Replies Latest reply on Jul 23, 2003 3:10 AM by 130g

    Durable subscriber not recieving messages

    130g Newbie

      Hiya folks

      I am having a problem with dissapearing messages!
      I have a publisher that publishes messages to a topic, on that topic I have registered a durable subscriber...so far so good :)
      I can see (in the console) that messages are retained in the topic untill the durable subscriber connects...well actually untill the subscriber starts it's session. And then the messages just dissapears without the subscriber receiving any of them...

      Any ideas as to where the messages escapes to?

      My setup...




      TopicConnectionFactory conFactory = (TopicConnectionFactory) ctx.lookup("ConnectionFactory");
      connection = conFactory.createTopicConnection("EmailerBean", "emailer");
      ses = connection.createTopicSession(false, javax.jms.Session.CLIENT_ACKNOWLEDGE);
      Topic topic = (Topic) ctx.lookup("topic/ndsmsEmailTopic");
      TopicSubscriber subscriber = ses.createDurableSubscriber(topic, "DurableNdsmsEmailTopic");
      Message m = subscriber.receiveNoWait();
      while(m != null) {
      m = subscriber.receiveNoWait();

        • 1. Re: Durable subscriber not recieving messages
          Adrian Brock Master

          Your config is not correct, it should be something like:

          DurableNdsmsEmailTopic <!-- matches id from client -->
          DurableNdsmsEmailTopic <!-- matches subscription name -->

          I don't see how messages could be retained with your config?


          • 2. Re: Durable subscriber not recieving messages
            130g Newbie

            Thank you Adrian for your answer!

            Duno about the retaining bit, maybe the purge/clean is only done when a connection is made and started?
            I determin the amount of messages in the topic by the DurableMessageCount attribute in the MBean view, is that the correct way?

            Anyway I tried you configuration change so that the jbossmq-state.xml is now:


            <snip is this important?>


            And it behaves exactly the same, the messages are retained (as seen by DurableMessageCount) untill I makes and starts a connection with the EmailerBean and then the messages are gone without me recieving any of them...

            btw I run on Jboss-3.2.1

            • 3. Re: Durable subscriber not recieving messages
              Adrian Brock Master

              Can you enable TRACE logging for org.jboss.mq
              and check the server log.

              I suspect you will find a message from the state manager
              that says it is re-registering the subscription because
              it does not match the configured subscription.

              Do you get the same problem if you don't add the config
              to jbossmq-state.xml and create the subscription from
              the client when it first subscribes?


              • 4. Re: Durable subscriber not recieving messages
                130g Newbie

                Duh!!! Why didnt I think of checking the trace output...

                The trace output stated that the messages was dropped because of timeout. The timeout value of the message was Long.MAX_VALUE so I am not sure why the messages was timed out, but it worked when I set timeout value to 14 days...

                Thank you for the help!