Author |
Message
|
rkford11 |
Posted: Wed Jun 13, 2007 5:50 am Post subject: msg and correl ID |
|
|
Partisan
Joined: 06 Jun 2004 Posts: 316
|
Is it possible to copy the messageID to correlation ID using MQ communication. i.e can I copy the message ID to correlation ID when i am sending a message from one queue manager to another?
Thanks |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed Jun 13, 2007 5:55 am Post subject: Re: msg and correl ID |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
rkford11 wrote: |
Is it possible to copy the messageID to correlation ID using MQ communication. i.e can I copy the message ID to correlation ID when i am sending a message from one queue manager to another?
Thanks |
Are you going to do it in one MQ put call ?
I think it is not possible ?
Of course you can set msgid and correlid to the same value but it is not recommended.
What do you need it for ? _________________ Marcin |
|
Back to top |
|
 |
tleichen |
Posted: Wed Jun 13, 2007 5:59 am Post subject: Re: msg and correl ID |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
rkford11 wrote: |
Is it possible to copy the messageID to correlation ID using MQ communication. i.e can I copy the message ID to correlation ID when i am sending a message from one queue manager to another?
Thanks |
In most TM traffic, this is exactly what happens by default! I suggest that you look at the Programming Guide and the Intercommunication manual for starters...  _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed Jun 13, 2007 6:04 am Post subject: Re: msg and correl ID |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
tleichen wrote: |
rkford11 wrote: |
Is it possible to copy the messageID to correlation ID using MQ communication. i.e can I copy the message ID to correlation ID when i am sending a message from one queue manager to another?
Thanks |
In most TM traffic, this is exactly what happens by default! I suggest that you look at the Programming Guide and the Intercommunication manual for starters...  |
But i think it is not question about default request - response scenario.
This is question how to ivoke MQ put, set new msgid and copy this new msgid to correlid in this one call.
Hm,
... Have I understood question correctly ? _________________ Marcin |
|
Back to top |
|
 |
tleichen |
Posted: Wed Jun 13, 2007 6:14 am Post subject: |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
In that case, you can do it, but it would be an extra operation. I once developed a set of encapsulation routines that did just that (among other things), because I liked the normal request-response protocol.  _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
rkford11 |
Posted: Wed Jun 13, 2007 6:55 am Post subject: Re: msg and correl ID |
|
|
Partisan
Joined: 06 Jun 2004 Posts: 316
|
marcin.kasinski wrote: |
But i think it is not question about default request - response scenario.
? |
No, this is a request - reply scenario.
I am trying to tie the request to reply because the target application cannot generate the correlation id. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jun 13, 2007 7:01 am Post subject: Re: msg and correl ID |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rkford11 wrote: |
No, this is a request - reply scenario.
I am trying to tie the request to reply because the target application cannot generate the correlation id. |
It doesn't have to - just copy the msg id from the request! _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 13, 2007 7:02 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If you know that the "server" (presumably the target) application can't act as a proper request/reply server (i.e., honoring the message identifier options in the Report field of the request message), then tell the qmgr to generate both a new MsgId, and a new correlation id when you do a PUT.
Save the new correlid, and use it for your subsequent get.
And cross your fingers that the server application will PRESERVE the msgid and correlid you sent. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Jun 13, 2007 1:08 pm Post subject: |
|
|
Guest
|
Take a look at get message options. here you can specify that you intend (ask the qmgr) to save the context fields from the message descriptor, and pass them on to a subsequent put. Take a look at put message options. |
|
Back to top |
|
 |
|