Author |
Message
|
ManishsAmit |
Posted: Fri Sep 26, 2003 3:27 am Post subject: msgID |
|
|
Newbie
Joined: 24 Sep 2003 Posts: 8 Location: India(Mumbai)
|
Hi!
I have one query regarding sending and receiving of messages.
While sending message to QManager msgID and CorreID also goes with msg,this two ID we have to generate or it get generated automatically for each msg we send to the QManager.
if have to generate this ID,How should i go further to do the same so the unqiue ID are generated for the same message.
With Regards
Manish |
|
Back to top |
|
 |
jhalstead |
Posted: Fri Sep 26, 2003 3:58 am Post subject: |
|
|
 Master
Joined: 16 Aug 2001 Posts: 258 Location: London
|
If I understand your quesion the queue manager can generate these for you, specify the following constants in your put message options (MQPMO.Options)
MQPMO_NEW_MSG_ID
MQPMO_NEW_CORREL_ID
Good luck
Jamie |
|
Back to top |
|
 |
ManishsAmit |
Posted: Fri Sep 26, 2003 4:11 am Post subject: MSGID and CorelationID |
|
|
Newbie
Joined: 24 Sep 2003 Posts: 8 Location: India(Mumbai)
|
jhalstead wrote: |
If I understand your quesion the queue manager can generate these for you, specify the following constants in your put message options (MQPMO.Options)
MQPMO_NEW_MSG_ID
MQPMO_NEW_CORREL_ID
Good luck
Jamie |
Our scenario is like there will be n no.of visitors who will be sending request messages to the server at the same time as per there requirement, now what we want is how we are supposed to keep a track of message for a particular user who has sent a message so that he receives the response for the same message he has sent not the other which is on the queue.
Now how we are supposed to tackle MSGID and Co-relationID, for each message. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 26, 2003 5:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You should read the Application Programming Guide for recommendations on doing request-reply processing with MQSeries.
The basics are your server app copies the request message id to the correlation id of the reply message and has the system generate a new message id. Then the requestor uses it's original message id to get the reply from it's queue based on correlation id. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ManishsAmit |
Posted: Fri Sep 26, 2003 5:22 am Post subject: MsdID and Co-relationID |
|
|
Newbie
Joined: 24 Sep 2003 Posts: 8 Location: India(Mumbai)
|
JeffLowrey wrote: |
You should read the Application Programming Guide for recommendations on doing request-reply processing with MQSeries.
The basics are your server app copies the request message id to the correlation id of the reply message and has the system generate a new message id. Then the requestor uses it's original message id to get the reply from it's queue based on correlation id. |
I am using a VB application to put messages on the MQ AS/400 server.
How can I genrate New MessageID and corelationID for each message going on server so that when i do MQGET call I may retrieve the response for the same MessageiD and co-relationID. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 26, 2003 5:30 am Post subject: Re: MsdID and Co-relationID |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
ManishsAmit wrote: |
I am using a VB application to put messages on the MQ AS/400 server.
How can I genrate New MessageID and corelationID for each message going on server so that when i do MQGET call I may retrieve the response for the same MessageiD and co-relationID. |
There are constants defined that you assign to either the message or the PutMessageOptions that tells MQSeries to generate a new Message Id, new correlation ID, or both.
Again, read the Application Programming Guide. And the COM manual for more information on using MQSeries with VB. Try the "Documentation" button at the top of this page to get to the manuals if you don't have them locally. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|