Author |
Message
|
wisemind85 |
Posted: Mon Jul 23, 2012 11:16 pm Post subject: fault tolerance in WMQ? |
|
|
Apprentice
Joined: 15 Jun 2012 Posts: 25
|
How to handle fault tolerance in WebSphere Message Queue (WMQ)? For example, if server goes down, so messages in transit get lost or stored in some kind of DB ?? |
|
Back to top |
|
 |
zpat |
Posted: Mon Jul 23, 2012 11:38 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Persistent messages are recovered when the queue manager restarts.
You can use standard IT techniques to protect data, RAID, HA/CMP, SAN and so on.
If you want high availability you could use HA/CMP (or other clustering) or Multi-instance.
If you want to protect against data loss for an entire site, you could (and we do) use SRDF replication.
Many options are possible, depending on platform, budget etc.
It's also very important to code applications (and their interface to MQ) in a transactionally safe way (e.g. using MQ syncpointing) because they are far more likely to fail than your hardware is. |
|
Back to top |
|
 |
wisemind85 |
Posted: Tue Jul 24, 2012 12:04 am Post subject: |
|
|
Apprentice
Joined: 15 Jun 2012 Posts: 25
|
Like message is in-fly state and WMQ server goes down , then How to recover those in-fly message ?
Backup queues is preferable or something else? |
|
Back to top |
|
 |
zpat |
Posted: Tue Jul 24, 2012 12:52 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Define "in flight"?
Do you mean currently being processed by the application?
Or do you mean currently residing on the queue manager?
As I mentioned, persistent messages are stored on disk, such storage can be protected against hardware failure in a variety of ways. |
|
Back to top |
|
 |
wisemind85 |
Posted: Tue Jul 24, 2012 1:24 am Post subject: |
|
|
Apprentice
Joined: 15 Jun 2012 Posts: 25
|
Thanks for your reply.
Yes in-flight means currently being processed by the application.
Where WMQ stores data ? AS we can see there is no Database is required in installation.
Thanks |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jul 24, 2012 2:39 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
wisemind85 wrote: |
Yes in-flight means currently being processed by the application. |
Messages being processed still exist within WMQ; they're logically not physically deleted until the processing application signals that it's now safe to delete them (typically when processing is complete)
wisemind85 wrote: |
Where WMQ stores data ? AS we can see there is no Database is required in installation. |
One of the parameters needed when you create a queue manager is described in the documentation as "data path". Take a guess what that's for.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Tue Jul 24, 2012 2:53 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Vitor - that's only true with syncpointed gets.
If you get without syncpoint, the message is no longer available. Should the application (or server) fail before the message data is safely processed and stored in a database, it will not be recovered automatically.
It could (with a lot of effort) be extracted from a linear log (if used).
To protect against message loss - the application must use syncpointed MQGETs (which can optionally be XA coordinated). Then the message will be rolled back to the queue if the application (or server) fails. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jul 24, 2012 4:26 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zpat wrote: |
Vitor - that's only true with syncpointed gets.
If you get without syncpoint, the message is no longer available. |
Because the application (by not using syncpoint) indicates immediately that it's safe to delete the message.
I stand by my assertion. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Tue Jul 24, 2012 4:40 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
That assumes the application developer knows exactly what he/she is doing. The above questions suggest otherwise.
There is a far greater risk of losing messages from incorrectly designed (or total lack of knowledge about) units of work than from hardware failures.
Since the default (for non-mainframe QMs) is NO syncpoint - most novice developers will place themselves at risk of losing messages if their application crashes before the data is persisted somewhere else.
Last edited by zpat on Tue Jul 24, 2012 4:49 am; edited 1 time in total |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jul 24, 2012 4:43 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
MQ doesn't support 'fault tolerance'. In fact, it can be fairly intolerant of your own faults.
It supports 'high availability'. It can be configured to be available any time you want it to be intolerant of your failings.
Look for 'high availability'. Look for 'multi-instance'.
READ TRY THINK REPEAT. |
|
Back to top |
|
 |
wisemind85 |
Posted: Tue Jul 24, 2012 10:37 pm Post subject: |
|
|
Apprentice
Joined: 15 Jun 2012 Posts: 25
|
Thanks mqjeff for your reply.
Then what should happened with in-flight message ? Like If an application is reading the message from MQ and got failed as
1 ) application server goes down where application is being deployed or 2) MQ Server goes down
then what should happened ? How to handle such sort of problems in both cases? |
|
Back to top |
|
 |
zpat |
Posted: Tue Jul 24, 2012 11:25 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Do you actually read the answers here?
SYNCPOINT
Look it up in the WMQ info center. |
|
Back to top |
|
 |
wisemind85 |
Posted: Tue Jul 24, 2012 11:29 pm Post subject: |
|
|
Apprentice
Joined: 15 Jun 2012 Posts: 25
|
Actually mqjeff has said that MQ doesn't support 'fault tolerance'. thats why I am asking again |
|
Back to top |
|
 |
zpat |
Posted: Wed Jul 25, 2012 12:39 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
MQ provides message recovery in the event of failures by using SYNCPOINT.
You get a message under syncpoint (MQGMO_SYNCPOINT) - and there is a failure, the message is recovered and made available again on the queue (with the MQMD.Back value incremented).
I think Jeff is being pedantic (surely not!) about the term "fault tolerant".
Why not read the Infocenter - and THEN ask questions here? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jul 25, 2012 2:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
wisemind85 wrote: |
Actually mqjeff has said that MQ doesn't support 'fault tolerance'. thats why I am asking again |
And both mqjeff and myself have answered exactly this question:
wisemind85 wrote: |
Then what should happened with in-flight message ? Like If an application is reading the message from MQ and got failed as
1 ) application server goes down where application is being deployed or 2) MQ Server goes down |
READ WHAT WE ARE SAYING. Better still, read the InfoCenter. Don't just post simplistic questions then repost if you don't get exactly the answer you want in exactly the format you expect. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|