ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Does each message in a group has the same message id?

Post new topic  Reply to topic
 Does each message in a group has the same message id? « View previous topic :: View next topic » 
Author Message
wildtiger
PostPosted: Mon May 13, 2002 11:46 am    Post subject: Does each message in a group has the same message id? Reply with quote

Acolyte

Joined: 21 Apr 2002
Posts: 55
Location: Canada

Does each message in a group has the same message id?
Back to top
View user's profile Send private message
mqonnet
PostPosted: Mon May 13, 2002 11:56 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
wildtiger
PostPosted: Mon May 13, 2002 12:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
mqonnet
PostPosted: Mon May 13, 2002 12:59 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
bduncan
PostPosted: Mon May 13, 2002 1:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Does each message in a group has the same message id?
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.