|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Failover Logic to secondary QM in JAVA |
« View previous topic :: View next topic » |
Author |
Message
|
PeterPotkay |
Posted: Wed Oct 23, 2002 9:30 am Post subject: Failover Logic to secondary QM in JAVA |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
I am trying to code some logic that will automatically attempt to connect to a secondary server/queue manager should the first become unavailable. The question is, what error codes should this method check for that would indicate a queue manager being unavailable?
So far, I think
2009 (MQRC_CONNECTION_ERROR),
2059 (MQRC_Q_MGR_NOT_AVAILABLE),
2161 (MQRC_Q_MGR_QUIESCING),
2162 (MQRC_Q_MGR_STOPPING)
will cover it. Am I missing any that should be added to this method? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
educos |
Posted: Tue Nov 19, 2002 8:00 am Post subject: |
|
|
 Apprentice
Joined: 18 Jul 2001 Posts: 34 Location: Salt Lake City, UT
|
I built a similar component that retries its connection to a queue manager (rather than go look for another one). When you run your code local to the queue manager, the reason codes you have documented in your email are sufficient. However, when you access the queue manager using host/port/channel, you also get MQRC_UNEXPECTED_ERROR. The list I handle below allows me to recover in every case, regardless of how brutally I break the connection and regardless of whether my code run locally or remotely from the queue manager.
MQException.MQRC_CONNECTION_BROKEN,
MQException.MQRC_HCONN_ERROR,
MQException.MQRC_Q_MGR_NOT_AVAILABLE,
MQException.MQRC_Q_MGR_QUIESCING,
MQException.MQRC_Q_MGR_STOPPING,
MQException.MQRC_UNEXPECTED_ERROR,
MQException.MQRC_OPEN_FAILED,
MQException.MQRC_MAX_CONNS_LIMIT_REACHED
Regards, |
|
Back to top |
|
 |
educos |
Posted: Wed Nov 20, 2002 7:03 am Post subject: |
|
|
 Apprentice
Joined: 18 Jul 2001 Posts: 34 Location: Salt Lake City, UT
|
You may, however, run into another issue after you reestablish a connection. See the "Ghost queue monitoring threads" topic in this forum... |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|