Author |
Message
|
sebastia |
Posted: Mon Oct 20, 2008 1:29 am Post subject: message responding method |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Good morning. Today I need a pointer to a book.
I know there is a way to send a REPLY message
where you have the Request message fields
"ReplyToQueue" and "ReplyToQueueManager",
and in the reponding queue manager
there is no remote queue at all,
except a Transmission queue
with the name of the remote queue manager.
The responder Puts the message in the ReplyToQueue,
it is not found, and MQ searches for a Xmit Q
with the name of the ReplyToQMgr ...
I would like to read more about this way of working,
but dont know how it is called.
Thanks for any pointer.
Seb, reading "Intercommunication". |
|
Back to top |
|
 |
David.Partridge |
Posted: Mon Oct 20, 2008 2:20 am Post subject: |
|
|
 Master
Joined: 28 Jun 2001 Posts: 249
|
In order to put a reply message in this case you populate the MQOD with both the ReplyToQueueManager (in the ObjectQMgrName field) and the ReplyToQueue (in the ObjectName field). You then open this for output.
You would set the MQMD.MsgType to indicate that this is a reply and put your reply message.
Internally MQ will then put the message and an associated MQXQH onto the transmission queue.
In order for this to work, you must have PUT authority onto the transmission queue (which is potentially a security exposure, as any user with access to that TQ has the ability to put a message onto any queue reachable through the channel servicing that TQ). If you don't have such access, there are things that can be done using a cluster alias and a locally defined QR).
Does that help? _________________ Cheers,
David C. Partridge |
|
Back to top |
|
 |
atheek |
Posted: Mon Oct 20, 2008 2:36 am Post subject: |
|
|
 Partisan
Joined: 01 Jun 2006 Posts: 327 Location: Sydney
|
Sebastia wrote: |
I would like to read more about this way of working,
but dont know how it is called. |
This is an example of application designing using client/server processing..You can have a server application polling a particular queue..Various client applications from different physical destinations can send requests to this queue which is then processed by the server application, the server then sends the response to the replyTo Q and QMGR specified in the request. This helps the server to correclty identify the client that has send the request and send the response back to the right client.
Clients can use permanent queues to receive the response back or can define a temporary dynamic queue for receiving the response.. |
|
Back to top |
|
 |
sebastia |
Posted: Mon Oct 20, 2008 6:31 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
David - yes, that helps, thank you.
But I would like to read more about it
So, I was asking for a book (or URL) pointer ...
( )
Best description I've found is in "Intercommunication",
(mq v7 page is 34 of 525)
and it is called "Queue name resolution" ... |
|
Back to top |
|
 |
sebastia |
Posted: Mon Oct 20, 2008 6:39 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
mr Atheek - your description is very clear thank you very much.
But, in fact, I want to "break" this environment.
Let me explain my situation.
We have a client program, that sends a message to our server program
and sets ReplyToQ and replyToQmgr in the request message
indicating where to send the answer.
Perfect.
It works. It ha sbeen working for months.
Now we want to Audit this communication.
So we have to take a copy of every entering request message,
and also a copy of every answer we send.
To duplicate the Request, we have MIRRORQ API exit
url = https://www-304.ibm.com/jct09002c/isv/tech/sampmq.html
And the problem is how to duplicate the Response message,
as it goes directly to the TRANSMIT QUEUE !!!
Any idea is welcome. Seb. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Oct 20, 2008 8:09 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I understand: you did not want to do the logging/auditing in the server application...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kevinf2349 |
Posted: Mon Oct 20, 2008 8:17 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
I may be confused here but doesn't MIRRORQ get invoked at MQPUT time?
If it does then why can't you MIRRORQ the put to the transmission queue? Then put it into a reqular LOCALQ with the tranmission header still on it thus proving not only what you replied, but where you were trying to send it?
Am I missing something?  |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Oct 20, 2008 8:29 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
kevinf2349 wrote: |
I may be confused here but doesn't MIRRORQ get invoked at MQPUT time?
If it does then why can't you MIRRORQ the put to the transmission queue? Then put it into a reqular LOCALQ with the tranmission header still on it thus proving not only what you replied, but where you were trying to send it?
Am I missing something?  |
There's a minor bug in mirrorq somewhere that causes it to think it shouldn't be mirroring stuff going to QREMOTES.
I think there are some old posts by clindsey that should address this. |
|
Back to top |
|
 |
sebastia |
Posted: Mon Oct 20, 2008 10:21 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
mr Saper : as always, MQ is in the middle of something else ...
On the left hand side, we have the client, that sends messages in XML.
On the right side, we have ICS (old MB) talking to SAP, that is the server.
And now, you are right again :
I can not go to SAP people and say
"please write some code to audit the MQ communications" ...
Kevin : the MQPUT of the Response message is done by ICS
(Interchange Server)
and yes, I dont care to capture the response message even if it has
the Xmit Header ...
I was asking for some pointer on how "queue name resolution" works,
to try to catch the message ...
And I am still waiting for that pointer ...
( ) |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Oct 20, 2008 10:40 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
This is why QNAMI, Transaction Vision, Cressida, etc have a place in the world. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|