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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicate Correlation ID

Status
Not open for further replies.

amity123

Programmer
Jun 13, 2005
1
US
I have perl program which needs to put a message then get the correlation id back and use the same correlation id to put messages related to the first message.

Most of the time it works well but I had an issue once where I get the same correlation id back for 2 different messages.

I dont have Commit after putting message? Is this a problem? What does commit do in case of put message?

also, Do I need to use Sync point when I use Commit?

Thanks for your help in advance.
 
Yes - you will need to use Commit if you are using syncpointing. If you don't have a commit and you are using syncpointing then the message will only appear on the queue when the queue is closed.

As for getting the same Correlid back....I would check the application. Remember to handle the correlid and messageid fields as binary not string.
 
You need to either clear the md.correlid before each put or use MQPMO_new_correl_id. Otherwise, MQ will use (and return) whatever was there before the put instead of generating a unique value to serve your purpose.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top