View previous topic :: View next topic |
Author |
Message |
vikaspaniker79 Beginner

Joined: 01 Aug 2005 Posts: 12 Topics: 4 Location: India
|
Posted: Fri Jun 30, 2006 4:40 am Post subject: MQ Message ID |
|
|
Hi,
If I try to do a GET to the MQ without the Message id, will it return with the corresponding message id for that Message.
Actually my program will PUT many requests on the Q, and the response for these would be random. The data coming in the response would not help me map the response with the corr. request. So i just wanted to check if the MESSAGE ID could help me.
Regards,
Vikas _________________ Cheers,
Vikas |
|
Back to top |
|
 |
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Fri Jun 30, 2006 4:57 am Post subject: |
|
|
vikaspaniker79,
If you want to retreive a particular unique message from a Queue using a Message identifier,then you can make use of the copy book MQMD Structure in the program which has the declaration for the variable MQMD-MSGID.
Code: |
** MQMD structure
10 MQMD.
** Message identifier
15 MQMD-MSGID PIC X(24) VALUE LOW-VALUES.
|
_________________ Shekar
Grow Technically |
|
Back to top |
|
 |
vikaspaniker79 Beginner

Joined: 01 Aug 2005 Posts: 12 Topics: 4 Location: India
|
Posted: Mon Jul 03, 2006 4:23 am Post subject: |
|
|
thanks shekhar...but well i know that i would get the message id..but my question is that will this message id be unique over the life cycle of a message...what i mean here is that in my interactive application pgm when i do a PUT on MQ, the message id is generated. But will the response for that also hold the same message id. _________________ Cheers,
Vikas |
|
Back to top |
|
 |
bob_buxton Beginner

Joined: 20 Dec 2002 Posts: 44 Topics: 0 Location: Hampshire, England
|
Posted: Mon Jul 03, 2006 5:33 pm Post subject: |
|
|
If you allow MQ to generate message ids they will be unique but if you generate your own message ids and store them in the msgid field before put then it is up to you to ensure uniqueness.
The normal convention is for an an application to copy the msgid from the input message into the correlation id of the reply message. So to find your reply message you would do an MQGET with matching correlid _________________ Bob Buxton
Ex Websphere MQ for zOS development |
|
Back to top |
|
 |
|
|