Author |
Message
|
franklinc |
Posted: Wed Aug 04, 2010 3:58 am Post subject: Auto reconnect after an MQ failure |
|
|
Newbie
Joined: 04 Aug 2010 Posts: 4
|
Hello all,
I'm experiencing an issue when MQ goes down for some reason I have to restart my servers in order for my MDBs/MDPs to reconnect to the queues. I have been searching for a way to automatically have them reconnect after and MQ failure/restart.
My setup is as follows:
- MDB/P listeners connected via Spring JMS containers
- JBoss 4.0.5 (will be moving to 5.0.0 within the next month)
- WMQ 6
Any help with this matter will be greatly appreciated! |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 04, 2010 4:09 am Post subject: Re: Auto reconnect after an MQ failure |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
franklinc wrote: |
Any help with this matter will be greatly appreciated! |
Upgrade to WMQv7 & use the new client auto-reconnect feature. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
franklinc |
Posted: Wed Aug 04, 2010 4:16 am Post subject: Re: Auto reconnect after an MQ failure |
|
|
Newbie
Joined: 04 Aug 2010 Posts: 4
|
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 04, 2010 4:38 am Post subject: Re: Auto reconnect after an MQ failure |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Does it? This is what I get for answering questions about Java. I should know better after all this time.....
Someone who knows what they're talking about will be along in a minute.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Aug 04, 2010 12:42 pm Post subject: Re: Auto reconnect after an MQ failure |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
franklinc wrote: |
Hello all,
I'm experiencing an issue when MQ goes down for some reason I have to restart my servers in order for my MDBs/MDPs to reconnect to the queues. I have been searching for a way to automatically have them reconnect after and MQ failure/restart.
My setup is as follows:
- MDB/P listeners connected via Spring JMS containers
- JBoss 4.0.5 (will be moving to 5.0.0 within the next month)
- WMQ 6
Any help with this matter will be greatly appreciated! |
I would expect you'd have to setup something line a connection listener attached to your MDB. So when the MDB goes down you should get an alert from the connection listener. Now you need to figure out how to programatically restart the MDB
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mvic |
Posted: Wed Aug 04, 2010 1:41 pm Post subject: Re: Auto reconnect after an MQ failure |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Aug 04, 2010 8:37 pm Post subject: Re: Auto reconnect after an MQ failure |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I take this to mean you can't use it from java base.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
franklinc |
Posted: Thu Aug 05, 2010 3:39 am Post subject: Re: Auto reconnect after an MQ failure |
|
|
Newbie
Joined: 04 Aug 2010 Posts: 4
|
Quote: |
I would expect you'd have to setup something line a connection listener attached to your MDB. So when the MDB goes down you should get an alert from the connection listener. Now you need to figure out how to programatically restart the MDB
Have fun  |
Well I do have a Spring JMS container which sits in front of my MDB. The Spring JMS container listens to the queue and when a message arrives it calls the onMessage() method of the MDB. Is there a setting here I can change for auto reconnect? |
|
Back to top |
|
 |
mvic |
Posted: Thu Aug 05, 2010 4:20 am Post subject: Re: Auto reconnect after an MQ failure |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
franklinc wrote: |
Well I do have a Spring JMS container which sits in front of my MDB. The Spring JMS container listens to the queue and when a message arrives it calls the onMessage() method of the MDB. Is there a setting here I can change for auto reconnect? |
If there is, it will should in the manuals in the MQ Information Center. Did you search the Information Center? Did you look at the URL I posted? |
|
Back to top |
|
 |
zpat |
Posted: Thu Aug 05, 2010 5:03 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Quote: |
Use the CONNECTIONNAMELIST and CLIENTRECONNECTOPTIONS properties of the MQClientConnectionFactory class to configure a client connection to automatically reconnect following a connection failure or an administrative request to reconnect client applications after stopping a queue manager.
|
I am told you can use a "maplist" to set such values in Spring. This is the sum total of my knowledge on this. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Aug 05, 2010 5:07 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
In addition, there are conditions on a Listener where the listener will shut itself down based on the backout settings. This is entirely JMS and not MQ.
I've forgotten what they are, but I suspect fjb_saper will remember.  |
|
Back to top |
|
 |
franklinc |
Posted: Thu Aug 05, 2010 7:20 am Post subject: Re: Auto reconnect after an MQ failure |
|
|
Newbie
Joined: 04 Aug 2010 Posts: 4
|
mvic wrote: |
franklinc wrote: |
Well I do have a Spring JMS container which sits in front of my MDB. The Spring JMS container listens to the queue and when a message arrives it calls the onMessage() method of the MDB. Is there a setting here I can change for auto reconnect? |
If there is, it will should in the manuals in the MQ Information Center. Did you search the Information Center? Did you look at the URL I posted? |
Yes, I have been to that site before. What concerned me was the note about Auto reconnect not being supported by MQ classes for Java.
I'm wondering though if the MDB sits behind a JMS container would that constraint still apply?
BTW, thanks to everyone for all the help! I really appreciate it  |
|
Back to top |
|
 |
mvic |
Posted: Thu Aug 05, 2010 7:39 am Post subject: Re: Auto reconnect after an MQ failure |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
franklinc wrote: |
Yes, I have been to that site before. What concerned me was the note about Auto reconnect not being supported by MQ classes for Java. |
Understood.
Perhaps there is a difference between "MQ Classes for Java" and "MQ Classes for JMS".
The URL I posted seems to suggest that. Perhaps IBM support can tell you for sure. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 05, 2010 11:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqjeff wrote: |
In addition, there are conditions on a Listener where the listener will shut itself down based on the backout settings. This is entirely JMS and not MQ.
I've forgotten what they are, but I suspect fjb_saper will remember.  |
They have to do with the MDB's reprocess and the BOTHRESH.
You have to keep the MDB's reprocess > than the BOTHRESH otherwise the MDB can no longer handle the poison message and will shut down.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|