Author |
Message
|
androidgalaxyman |
Posted: Thu Jan 02, 2014 8:34 pm Post subject: MQMD properties group id solution |
|
|
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 |
|
 |
Vitor |
Posted: Fri Jan 03, 2014 4:48 am Post subject: Re: MQMD properties group id solution |
|
|
 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 |
|
 |
gs |
Posted: Fri Jan 03, 2014 4:59 am Post subject: |
|
|
 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 |
|
 |
androidgalaxyman |
Posted: Sun Jan 05, 2014 7:53 pm Post subject: Re: MQMD properties group id solution |
|
|
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 |
|
 |
androidgalaxyman |
Posted: Sun Jan 05, 2014 7:56 pm Post subject: Asked Now |
|
|
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 |
|
 |
Vitor |
Posted: Mon Jan 06, 2014 4:59 am Post subject: Re: MQMD properties group id solution |
|
|
 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 |
|
 |
McueMart |
Posted: Mon Jan 06, 2014 5:05 am Post subject: |
|
|
 Chevalier
Joined: 29 Nov 2011 Posts: 490 Location: UK...somewhere
|
|
Back to top |
|
 |
Vitor |
Posted: Mon Jan 06, 2014 5:13 am Post subject: |
|
|
 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 |
|
 |
|