Title: RE: [developers] guaranteed-delivery problem with intermittent network

Right. Don't do that, that's what ExceptionListeners are for.
MsgService is a simple wrapper, and I'm connecting to the queue
named "myqueue" and registering an Exception and MessageListener class
pointed to by aListener.
The onException() in the listener class sets connected to false.

Some other details removed:

  while (!done) {
    if (!connected) {
       try {
           msgSrvc = new MsgService("myqueue",
                                 aListener,aListener);
           connected = true;
          
         } catch (SystemUnavailableException e) {
           log.error("Queue down");
            
           }
         wait(60000); // or whatever
    }

-----Original Message-----
From: Garth A. Fisher [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 11:22 AM
To: [EMAIL PROTECTED]
Subject: [developers] guaranteed-delivery problem with intermittent
network


 
What does your retry code look like?  I tried building a session every
minute and then
closing it, but it seems a bit heavy weight just to test the connection.

-----Original Message-----
From: Vago, John N [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 8:50 AM
To: [EMAIL PROTECTED]
Subject: [developers] guaranteed-delivery problem with intermittent
network



onException is called when the connection is lost, as you discovered.
Set a flag to tell your 'main loop' (term use loosely) to
reconnect. Don't try to re-use it. I retry the connection
every 30 sec or so in my consumers...

-----Original Message-----
From: Michael Nonemacher [ mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ]
Sent: Monday, September 10, 2001 10:36 AM
To: [EMAIL PROTECTED]
Subject: [developers] guaranteed-delivery problem with intermittent
network


------------------------------------------------------
SwiftMQ developers mailing list * http://www.swiftmq.com
To unsubscribe from this list, send an eMail to
[EMAIL PROTECTED] and write in the body of your message:
UNSUBSCRIBE developers 
Archive: http://www.mail-archive.com/[email protected]/



Reply via email to