Author |
Message
|
padapada |
Posted: Tue Oct 30, 2007 5:41 am Post subject: Proper backout queue handling alias/remote/cluster |
|
|
Newbie
Joined: 30 Oct 2007 Posts: 3
|
Hi,
I implemented the method used in backout.java. It works fine for a local queue but it does not work (inquire of bothresh, boqname) for alias/remote queues. And I get this feeling it will not work for queues in a cluster either...
Is there any guideline/howto/example describing how a well-behaved application should implement the backout requeueing functionality for alias/remote queues and queues in a cluster?
Do I have to reinvent the wheel myself?
If I had to I would need some ingredients:
- MQPutMessageOptions.resolvedQueueManagerName
- MQPutMessageOptions.resolveQueueName
- Transaction across the local and remote queuemanager (Possible???)
Patrick |
|
Back to top |
|
 |
Vitor |
Posted: Tue Oct 30, 2007 5:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
The concept of backout is irrelevant to a remote queue, which is really just a pointer to a non-local destination. Once the message has been accepted for delivery there's nothing it can be backed out onto and problems are handled by the queue manager, typically using the dead letter queues.
As for alias queues, they too are pointers but to a local destination. The same point is true, except you can interogate the underlying queue in a way you can't for a remote destination.
Cluster queues support backout, but only where they're the destination. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
padapada |
Posted: Tue Oct 30, 2007 6:54 am Post subject: |
|
|
Newbie
Joined: 30 Oct 2007 Posts: 3
|
Ok, I understand your answer in the context of sending a message to an alias/remote/cluster queue.
Now suppose:
- connect to an alias/remote/cluster queue.
- inquire queue.bothresh/queue.boqname
- *receive* a message from queue
- want to check whether message.backout_count > queue.bothresh and move it to queue.bqname...
This is:
- easy for local queue (inquire bothresh, boqname , send to backout queue)
- less easy for alias to local queue (inquire underlying queue, send to backout queue)
- impossible for remote/cluster queue. (inquire is not supported for remote queue. There seems not to exist a clean way to get queue.bothresh and queue.boqname of the original queue. So I could make the threshold and backout queuename configurable in my application, but that completely defeats the purpose of having bothresh and boqname defined in the queue definition in MQ...)
Patrick |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Oct 30, 2007 7:07 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
The cluster queue would be a local queue to somebody (application that is actually getting from the queue) and that somebody would be able to perform the backout work. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 30, 2007 7:09 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You can not issue an MQGET against a remote queue.
You can only issue an MQGet against a QLOCAL or a QALIAS that points to a QLOCAL.
You can inquire against a QALIAS to get the resolved qname, and then use that for your inquire on BOTHRESH/BOQNAME.
But you will not be able to receive messages from a non-local queue. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Oct 30, 2007 7:11 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
padapada wrote: |
Ok, I understand your answer in the context of sending a message to an alias/remote/cluster queue.
Now suppose:
- connect to an alias/remote/cluster queue.
- inquire queue.bothresh/queue.boqname
- *receive* a message from queue
- want to check whether message.backout_count > queue.bothresh and move it to queue.bqname...
This is:
- easy for local queue (inquire bothresh, boqname , send to backout queue)
- less easy for alias to local queue (inquire underlying queue, send to backout queue)
- impossible for remote/cluster queue. (inquire is not supported for remote queue. There seems not to exist a clean way to get queue.bothresh and queue.boqname of the original queue. So I could make the threshold and backout queuename configurable in my application, but that completely defeats the purpose of having bothresh and boqname defined in the queue definition in MQ...)
Patrick |
You need to revise your view and read up on some MQ manuals or search the site some more
It is not impossible for a remote queue -- it is just meaningless and not applicable as you will never be able to GET a message from a remote queue. _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Tue Oct 30, 2007 7:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
padapada wrote: |
Now suppose:
- connect to an alias/remote/cluster queue.
- inquire queue.bothresh/queue.boqname
- *receive* a message from queue
- want to check whether message.backout_count > queue.bothresh and move it to queue.bqname...
|
This is slightly pointless for an alias queue (it's the underlying queue you should be working on) and ridiculous for a remote queue. I've already said messages cannot be rolled back onto it because there's no queue there!
RTF Intercommunication M _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
padapada |
Posted: Tue Oct 30, 2007 7:25 am Post subject: |
|
|
Newbie
Joined: 30 Oct 2007 Posts: 3
|
I'll resort to reading "Websphere MQ V6 Fundamentals" first... |
|
Back to top |
|
 |
|