|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Does each message in a group has the same message id? |
« View previous topic :: View next topic » |
Author |
Message
|
wildtiger |
Posted: Mon May 13, 2002 11:46 am Post subject: Does each message in a group has the same message id? |
|
|
 Acolyte
Joined: 21 Apr 2002 Posts: 55 Location: Canada
|
Does each message in a group has the same message id? |
|
Back to top |
|
 |
mqonnet |
Posted: Mon May 13, 2002 11:56 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
No.
I would not say that it is not possible, unless it is generated by the user/app.
Each message has a unique msgid always within or outside a group. If you are confusing yourself with segmentation. Then yes, all the segments would have the same msgid, for a message, within or outside a group.
Cheers.
Kumar _________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
wildtiger |
Posted: Mon May 13, 2002 12:19 pm Post subject: |
|
|
 Acolyte
Joined: 21 Apr 2002 Posts: 55 Location: Canada
|
But when I used the following options to send a group of messages ( I didn't set messageId to MQMI_NONE before sending them), I found all the message within a group have the same message id and same group id.
pmo.options = MQC.MQPMO_LOGICAL_ORDER;
message.format = MQC.MQFMT_STRING;
message.persistence = messagePersistent;
message.messageType = MQC.MQMT_DATAGRAM;
message.groupId = MQC.MQGI_NONE;
message.setVersion ( MQC.MQMD_VERSION_2 );
message.messageFlags = MQC.MQMF_MSG_IN_GROUP;
Should I set messageId before I send them? |
|
Back to top |
|
 |
mqonnet |
Posted: Mon May 13, 2002 12:59 pm Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
One of the reasons why you are getting the same msgid always is because after the first put, you did not reinitialize the md. And used the same md, which in turn sent in the msgid from the first put. Since the app is setting the msgid here, the rest of the puts assume this to be the msgid and dont change it. If this is the problem, then you need to re-initialize your MD with nulls or blanks, at least for the msgid(if you want a new one generated for each put).
Cheers.
Kumar _________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
bduncan |
Posted: Mon May 13, 2002 1:15 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
Yes, you answered your own question:
Quote: |
I didn't set messageId to MQMI_NONE before sending them |
If you don't do this after each MQPUT, (assuming you're using the same MQMD object for each MQPUT) all your messages will have the same Message Id. You'd have this same problem even if you weren't using message groups. Anytime you call MQPUT, passing in an MQMD object with MessageId already set, the queue manager will use that value instead of generating a new message id. _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|