Author |
Message
|
nbtvac0 |
Posted: Wed Jul 14, 2004 3:42 pm Post subject: Program to direct messages to an alternate remote qmgr |
|
|
Newbie
Joined: 14 Jul 2004 Posts: 2 Location: Concord, CA.
|
Hi... we wrote a program (z/OS) that reads messages from an XMITQ and redirect these messages to an alternate remote queue manager. We plan to use this program when for some reason the "target remote queue manager" is down for an extended period of time, so that the messages stuck in the XMITQ can be delivered to an alternate remote queue manager. The program basically reads the message(s) from the XMITQ; changes the MQXQH_REMOTEQMGRNAME with the name of the alternate remote queue manager; then put the message into the XMITQ of the alternate remote queue manager. This seems to work on the first message we sent across. On the second message, both sending and receiving channels gets "channel sequence errors". We reset the sequence to 1 and repeat the test and get the same sequence errors on the second message (the first message comes across just fine).....
Any idea on what the program is doing wrong?
Thank you. |
|
Back to top |
|
 |
kman |
Posted: Wed Jul 14, 2004 8:25 pm Post subject: |
|
|
Partisan
Joined: 21 Jan 2003 Posts: 309 Location: Kuala Lumpur, Malaysia
|
I would suggest you put your remote queue manager in a cluster. When one queue manager is down, the message is still delivered.. to the other queue manager without needing to pickup from the xmitq and put to another xmitq. The mq cluster comes with mq, so there is no additional cost there.
On the other hand, did you set the message format into xmitq hdr format? MQFMT_XMIT_Q_HDR |
|
Back to top |
|
 |
nbtvac0 |
Posted: Wed Jul 14, 2004 9:36 pm Post subject: |
|
|
Newbie
Joined: 14 Jul 2004 Posts: 2 Location: Concord, CA.
|
The queue manager(s) in question are outside of our cluster and is owned/maintained by an independent group. It was decided not to "overlap" clusters. So we have to use classic channels.
As for the xmitq hdr format: When the program retrieves the message from the XMITQ, only the MQXQH_REMOTEQMGRNAME is modified and the entire message (as it was retrieved from the XMITQ with headers intact) is put into the alternate XMITQ. |
|
Back to top |
|
 |
kman |
Posted: Wed Jul 14, 2004 10:24 pm Post subject: |
|
|
Partisan
Joined: 21 Jan 2003 Posts: 309 Location: Kuala Lumpur, Malaysia
|
well at least you need to set the message format.
I haven't done this part before, so I am not sure why it is tied to the channel sequence number.
Is the remote queue, and/or remote qm the same name? I would have change the channel to use this xmitq queue instead.. so that message just got transferred as usual.
I mean.. Ch1.to.Ch2 use xmitq Xm1.
When problem happen, change Ch1.to.Ch3 to use xmitq Xm1. |
|
Back to top |
|
 |
Michael Dag |
Posted: Thu Jul 15, 2004 12:39 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
Is this about 1 Queue or more Queues?
If 1 I would 'get' the message from XMIT Queue, strip
the XMIT header and put the message as is to ALT.RQUEUE
Where ALT.RQUEUE is a normal remote Queue definition,
pointing to the alternate QueueManager.
This way you are using plain MQSeries techniques and don't
need to mess with overwriting values in a header... _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 15, 2004 11:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Why not specify as xmitq an alias queue.
When you need to go to the alternate destination all you have to do is change the base queue on your alias queue. The remote queues reference the alias queue as xmitq...
This should automatically take care of new messages and be transparent to the application.
Now to empty the ones already on the queue, switching the destination on the channel if possible sounds fine to me.
This means you would need to have 2 channels on each of the destination qmgrs... a regular one and the alternate one. So you change pointers at will. Remember whenever you change pointer with the sending channel to change as well the sequence number.
Happy trails
 |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Jul 15, 2004 7:55 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Use the MO71 support pac. This functionality is built in, and it works 100%. We have used it in just such a scenario.
It also works great for replaying messages out of the DLQ, either intoi the original destination queues, or to whatever queues we want.
I have moved thousands of messages at a time this way. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|