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

Using your own GroupId

Status
Not open for further replies.

jbmjlm10

Programmer
Jun 16, 2004
11
US
I'm trying to use my own GroupId value, but MQSeries insists on generating its own. This does not make sense to me. Here's what I have on a c programs:
MQBYTE24 GroupId = "123456";
I also have the following before the PUT:
md.MsgFlags = MQMF_MSG_IN_GROUP ;
pmo_Options = MQPMO_LOGICAL_ORDER ;
Before I do each PUT, I'm setting the GroupId to "123456"
with the following statement:
memcpy(md.GroupId, GroupId, sizeof(md.GroupId));
I have a printf statements that tells me that md.GroupId is definitely set to:
md.GroupId = 313233343536000000000000000000000000000000000000'X
which is the correct 123456 value. But, after all the messages are put to the queue, and I browse the queue, the GroupId of each message is equal to this:
GroupId : X'414D512045524551534E44312020202040CC6AA8202FC802'
which is an MQSeries generated ID and not my own. What am I doing wrong? Does this make sense? Thank you for your help.

 
I've answered my own question. If you want to set your own GroupId value, the "pmo_Options = MQPMO_LOGICAL_ORDER" option should not be used. I removed that and the GroupId was set to the value I specified.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top