5 Replies Latest reply on Mar 21, 2003 6:28 AM by pliusx2001

    Odd durable subscription behavior

    clajoie

      I'm seeing what I believe is some odd behavior from durable topic subscriptions. I'm new to JMS and JBoss in general, so I may just be expecting something that isn't true.

      Here's the scenario:
      1. Client creates a durable subscriber known as "foo"
      2. Close the connection and exit the client VM
      3. Start new VM and create a durable subscriber named "foo".

      The behavior I see is JBoss (3.2RC3 on JDK 1.4) creating a seperate, unique, durable subscriber, with different client IDs. What I expected to see was the subscriber gotten in step 3 to be the same as the one created in step 1. So, I guess, my question is how do I get a client to use an already existing subscription (e.g. if the client had crashed and been restarted)?

      I apologize in advanced if I'm just missing something obvious in the JMS spec about this.

        • 1. Re: Odd durable subscription behavior

          You need to login using a user/password.
          The anonymous subscription is only useful
          if the connection remains open, which is not true
          for a client crash.

          The combination of user/subscription will allow
          the new client to regain the subscription.

          Regards,
          Adrian

          • 2. Re: Odd durable subscription behavior
            clajoie

            I was. I was using the dynsub user, but looking closer at jbossmq-state.xml I realize now that user doesn't have an ID associated with it. Associating one with it solved the problem. Thanks for the help.

            • 3. Re: Odd durable subscription behavior
              pliusx2001

              I am a newbie.I have a question about "Odd durable subscription behavior" too.
              I have a application as below:
              1. An application client that calls an session bean.
              2. This session bean publishes several messages to a topic.
              3. A message-driven bean that receives and processes the messages,using a durable topic subscriber and a message selector .

              Now I can run this program.but this message-driven bean always miss some messages that Published by session bean. I had already config this message-driven bean as a
              Durable Subscriber.
              some times STDOUT looks like this:
              invalid console appender config detected, console stream is looping
              Can you tell me Why? Thank you very much!!!

              Comment:I use Jboss3.0.6 and connectionFactory JNDI is
              java:/JmsXA.

              • 4. Re: Odd durable subscription behavior

                This is a different problem, please start a new
                thread!

                Regards,
                Adrian

                • 5. Re: Odd durable subscription behavior
                  pliusx2001

                  Sorry,Thank you !