Author |
Message
|
starki78 |
Posted: Mon Sep 24, 2007 11:38 pm Post subject: How to poll a remote queue? |
|
|
Acolyte
Joined: 24 Sep 2007 Posts: 53
|
Hi
Polling a Remote Queue means for me to
check the status of the Queue better to say the status of the Connection.
My problem is that I cannot read it.
So I need some operation that tells me, the queue is available
without reading it.
What is the operation?
If I don't find this out I cannot use the remote queue as checking
the status before writing onto it is a requirement before going into production.
Thanks
for any input
Christian |
|
Back to top |
|
 |
zpat |
Posted: Mon Sep 24, 2007 11:44 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
MQSeries is meant to be a loosely-coupled form of integration.
Your application should not have awareness of the type of queue (local or remote) or whether the remote end is currently connected.
System management shoud be separate from the application and there are many ways to verify that MQ channels are working.
A good product is Appwatch from MQsoftware. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 24, 2007 11:44 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Ok, a number of points:
You can only poll a queue hosted by the queue manager your application is connected to. There's nothing to stop you connecting to a queue manager remote to the machine on which your application is running, making it local,
What you're trying to do is very much anti-pattern for WMQ. The point of using WMQ is so that the sending application a) doesn't need to know the name of the queue it's eventually writing to b) doesn't need to know where it is & c) doesn't need to care if it's available or not.
Bottom line - you can't poll a queue remote to your queue manager and your application shouldn't want to. This will remain true no matter how many times you ask:
http://www.mqseries.net/phpBB2/viewtopic.php?p=191944
Your MQ admin will have various tools & methodolgies by which he can determine if things are working. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 24, 2007 11:51 pm Post subject: Re: How to poll a remote queue? |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
starki78 wrote: |
checking the status before writing onto it is a requirement before going into production.
|
It shouldn't be - get whoever's setting this requirement to read the Intercommunication manual again. Or for the first time.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
starki78 |
Posted: Tue Sep 25, 2007 12:22 am Post subject: |
|
|
Acolyte
Joined: 24 Sep 2007 Posts: 53
|
thanks for your replies.
It's my task to establish that the following scenario is working.
From an enterprise service bus response queue you should connect to MQSeries Remote Queue and just write.
I've three possibities: 1. Disable polling
2. Poll in a way that this is no unsupported pperation
for MQSeries remote queue
So if possibility 2 is not good fashing (anti-pattern)
I can choose if disable polling is possible or using
local queue and using MQSeries features pushing the data from local to remote queue.
Thanks for helping me understand
Christian |
|
Back to top |
|
 |
Vitor |
Posted: Tue Sep 25, 2007 12:25 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
There is no reason in WMQ to poll anything just to see if it's working. Even if you're using an ESB. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Tue Sep 25, 2007 1:50 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Polling and MQ go together like chalk and cheese. Don't do it.
If the MQPUT operation succeeds then MQ has the message stored safely and will deliver it at some point.
It is not the application's job to manage the infrastructure.
If you want to know the message has arrived you can either wait for a reply message from the other application, or use COA/COD event messages.
So if you want to use synchronous style messaging, then after the MQPUT issue a MQGET with WAIT on a reply queue, if 2033 (after say 30 seconds) then do what you want to deal with the "connection not working".
Otherwise use asychronous style and don't wait for a reply - leave it to MQ (persistent messages).
In any case what matters is that the message is processed, not that the remote queue exists. |
|
Back to top |
|
 |
starki78 |
Posted: Tue Sep 25, 2007 3:24 am Post subject: |
|
|
Acolyte
Joined: 24 Sep 2007 Posts: 53
|
thank you - this was very helpful!
I'll think about it.
Nice greetings
Christian |
|
Back to top |
|
 |
|