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 » MQMD properties group id solution

Post new topic  Reply to topic
 MQMD properties group id solution « View previous topic :: View next topic » 
Author Message
androidgalaxyman
PostPosted: Thu Jan 02, 2014 8:34 pm    Post subject: MQMD properties group id solution Reply with quote

Novice

Joined: 02 Jan 2014
Posts: 13

Dear all,

i am very new bie to this forum, i would like to know about Group ID for the MQMD properties.

Requirement :
A Client wants to add the Group ID from client application for the MQMD message property.

Study :

Group ID is the Group Identifier to identify the set of messages.

when i read through IBM API documentation "Message groups and segments can be processed correctly only if the group identifier is unique. For this reason, applications must not generate their own group identifiers;

But our client wants to set the user defined group id for posting the message .
    1. My Question is , as per the IBM documentation if we need to set that value, we should maintain MQPMO_LOGICAL_ORDER necessarily?

    2. Do we need to consider while this thing for Put alone or Get (Message) ?


Please guide me! Thanks

If MQPMO_LOGICAL_ORDER is specified, the queue manager automatically generates a unique group identifier for the first message in the group or segment of the logical message, and uses that group identifier for the remaining messages in the group or segments of the logical message, so the application does not need to take any special action. This is the recommended procedure.
If MQPMO_LOGICAL_ORDER is not specified, the application must request the queue manager to generate the group identifier, by setting GroupId to MQGI_NONE on the first MQPUT or MQPUT1 call for a message in the group or segment of the logical message. The group identifier returned by the queue manager on output from that call must then be used for the remaining messages in the group or segments of the logical message. If a message group contains segmented messages, the same group identifier must be used for all segments and messages in the group.
When MQPMO_LOGICAL_ORDER is not specified, messages in groups and segments of logical messages can be put in any order (for example, in reverse order), but the group identifier must be allocated by the first MQPUT or MQPUT1 call that is issued for any of those messages.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jan 03, 2014 4:48 am    Post subject: Re: MQMD properties group id solution Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

androidgalaxyman wrote:
Requirement :
A Client wants to add the Group ID from client application for the MQMD message property.


That's not a business requirement, that's a technical requirement. Why exactly does your client think they need to do this? Because it's likely they don't want to do this, they think they need to.

androidgalaxyman wrote:
For this reason, applications must not generate their own group identifiers;


Nice study; you are to be congratulated.

So the IBM documentation says that applications must not generate group identifiers. Not "should not", but "must not". Why does the client want to go against this? When they see a sign saying "Danger Minefield - do not enter", do they still walk into it if they've decided it's the best route?

What you need to do is find out why the client wants to do this. With that information you can find a way to meet their real needs.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gs
PostPosted: Fri Jan 03, 2014 4:59 am    Post subject: Reply with quote

Master

Joined: 31 May 2007
Posts: 254
Location: Sweden

I'd ask the client WHY they'd like to set the group ID. Can't really see why they should.

If they want to track it, ask them to get it once they've written the message(s).
Back to top
View user's profile Send private message
androidgalaxyman
PostPosted: Sun Jan 05, 2014 7:53 pm    Post subject: Re: MQMD properties group id solution Reply with quote

Novice

Joined: 02 Jan 2014
Posts: 13

Vitor wrote:
androidgalaxyman wrote:
Requirement :
A Client wants to add the Group ID from client application for the MQMD message property.


That's not a business requirement, that's a technical requirement. Why exactly does your client think they need to do this? Because it's likely they don't want to do this, they think they need to.

androidgalaxyman wrote:
For this reason, applications must not generate their own group identifiers;


Nice study; you are to be congratulated.

So the IBM documentation says that applications must not generate group identifiers. Not "should not", but "must not". Why does the client want to go against this? When they see a sign saying "Danger Minefield - do not enter", do they still walk into it if they've decided it's the best route?

What you need to do is find out why the client wants to do this. With that information you can find a way to meet their real needs.



Thanks @vitor. The same question i inquired to the client , why they want to go against IBM specification. But may be the problem , they need to classify the group message under single groupID. As per the documentation group id generation should be handled by the MQ iteself, then only safer way of retrieving the correct order of message when do get()
Back to top
View user's profile Send private message
androidgalaxyman
PostPosted: Sun Jan 05, 2014 7:56 pm    Post subject: Asked Now Reply with quote

Novice

Joined: 02 Jan 2014
Posts: 13

gs wrote:
I'd ask the client WHY they'd like to set the group ID. Can't really see why they should.

If they want to track it, ask them to get it once they've written the message(s).


Thanks gs. Now i asked.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jan 06, 2014 4:59 am    Post subject: Re: MQMD properties group id solution Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

androidgalaxyman wrote:
As per the documentation group id generation should be handled by the MQ iteself, then only safer way of retrieving the correct order of message when do get()


You said it.
_________________
Honesty is the best policy.
Insanity is the best defence.


Last edited by Vitor on Mon Jan 06, 2014 5:08 am; edited 1 time in total
Back to top
View user's profile Send private message
McueMart
PostPosted: Mon Jan 06, 2014 5:05 am    Post subject: Reply with quote

Chevalier

Joined: 29 Nov 2011
Posts: 490
Location: UK...somewhere

Well to be honest, even IBM is confused on this subject:

The MQ infocenter says you shouldn't do it (although in a rather unclear way except for the one 'explicit' sentence which has been highlighted)

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=%2Fcom.ibm.mq.csqzak.doc%2Ffr13170_.htm

Whereas the Broker infocenter seems to be fine with manually setting it:
http://pic.dhe.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac25710_.htm

I have perosnally done it using UUIDASBLOB in the past which imho is safe enough.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jan 06, 2014 5:13 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

McueMart wrote:
I have perosnally done it using UUIDASBLOB in the past which imho is safe enough.


And is effectively what the queue manager is doing.

The problem for me is the OP's comment:

androidgalaxyman wrote:
A Client wants to add the Group ID from client application for the MQMD message property.


That doesn't sound like any kind of GUID but more like some kind of business string value. That's not such a good idea.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQMD properties group id solution
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.