Author |
Message
|
Prasant Padhi |
Posted: Wed Dec 01, 2004 11:09 am Post subject: Message Id |
|
|
Newbie
Joined: 01 Dec 2004 Posts: 4
|
I am new to MQ. I have a question. Does the message Id field gets generated by the queue manager eveytime the message is put into a queue. I mean even if the message already have the message id field populated, does the queue manager again overrides it? |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Dec 01, 2004 11:49 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Check out the application programming guide. There are several flags in the Options field of the MQPMO that you can use that control how the message/correlation id fields get set. |
|
Back to top |
|
 |
JT |
Posted: Wed Dec 01, 2004 12:03 pm Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Quote: |
For the MQPUT and MQPUT1 calls, if MQMI_NONE or MQPMO_NEW_MSG_ID is specified by the application, the queue manager generates a unique message identifier when the message is put, and places it in the message descriptor sent with the message.
The sending application can also specify a particular value for the message identifier, other than MQMI_NONE; this stops the queue manager generating a unique message identifier. |
|
|
Back to top |
|
 |
bob_buxton |
Posted: Wed Dec 01, 2004 3:14 pm Post subject: |
|
|
 Master
Joined: 23 Aug 2001 Posts: 266 Location: England
|
Forgetting to reset the messageid and correlid before each MQPUT and MQGET call are among the most common MQ programming errors.
On puts you end up putting all messages with identical id while on get you find you can only get the first message from the queue. The only time the application works is if you make the mistake in both put and getting side!  _________________ Bob Buxton
Ex-Websphere MQ Development |
|
Back to top |
|
 |
shusneimtahra |
Posted: Thu Apr 12, 2007 12:59 pm Post subject: |
|
|
Novice
Joined: 28 Mar 2007 Posts: 15
|
Hi,
We did not mention 'MQPMO_NEW_MSG_ID' or 'MQMI_NONE' while putting and while sending messages in a group and all the messages had the same message id.
But still, the target application was able to read all the records within the group without any issues.
Any reason for this??
Regards,
shusneimtahra |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Apr 12, 2007 1:18 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The receiving application was written better than yours was, to not try and get each message by MsgId, but instead just keep getting every message.
Or it was written just as badly as yours, and it kept asking for the next message with the same MsgId. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|