Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Message Id and Correl Id

Status
Not open for further replies.

fuzzbox

Programmer
Sep 19, 2000
4
0
0
IE
Hi
I am doing some MQ application and I need to send a message using Msg Id and retrieve only the response to this message using Correl Id (at least I think thats what I should be doing).
When I send a message - I use the MQPMO_NEW_MSG_ID option to ask the Queue to create a new, unique message ID - but it doesn't seem to be doing this as every message which I put on the queue receives the same message Id (well it seems to anyway).

Am I missing something ? Or doing something wrong ?

Thanks in advance
Brian

 
Be careful to clear the messageID field between puts, or else you'll get the same ID used over and over. Try this:
1. Application 1 MQPUT using MsgID
2. Application 2 MQGET
3. Application 2 Move MsgID to CorrelID (outbound msg)
4. Application 2 MQPUT that CorrelID
5. Application 1 MQGET using CorrelID = original MsgID


Good Luck,

Scott Meridew
MQ Squared
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top