3 Replies Latest reply on Feb 4, 2002 4:02 PM by pra

    JMS Reconnection Problem

    keithk

      Hi:
      I have implmemented a MDB which forwards a message from a local queue to another remote queue. Everything works fine until I shut down the remote JBoss server (hence the remote queue). Now, when a message is present in the local queue, the local MDB picks it up and tries to forward it to the remote queue. Since, the remote queue is done, it tries to resend it over and over again. Is there any control over how often it should retry? Then, when I bring up the remote JBoss server (hence the remote queue), the delivery of these mesages through the retries continue to fail. It looks like the local JBoss server is not re-establishing connecting to the remote JBoss server once the connection to the remote server is broken. The only way the the retries become successful is when I restart the local JBoss server while the remote Jboss server is up.

      It is a known problem or am I doing something incorrectly?

        • 1. Re: JMS Reconnection Problem

          How are you forwrding messages in the MDB? Do you use the JMS ra or vanilla JMS.

          Your problem I would guess is that the connection needs to be reestablishes each time when a send is tried. The JMS ra will probably not do that (wich could be worh looking at).

          //Peter

          • 2. Re: JMS Reconnection Problem
            keithk

            Peter,
            I am using JMS ra to forward the messages. Is this the wrong way to do it in general, or is it a limitation of JBossMQ?

            Thanks
            keith

            • 3. Re: JMS Reconnection Problem

              It's a limitiation of JMS ra you could say. It does not have any failsafe semantics. It shoudl probably be added some more failsafe handling to it, but I do not have time to do that right now.

              If you want failsafe you you will have to manage the JMS connection your self.

              //Peter