Posted: Thu Feb 07, 2013 1:43 pm Post subject: MQGET Match message using both MsgId and CorrelId
Centurion
Joined: 03 Oct 2004 Posts: 142
I always wondered under what circumstances one would use both the MQGET message match options - MQMO_MATCH_CORREL_ID + MQMO_MATCH_MSG_ID to retrieve messages from a queue. Anyone has any good reasons to use both for matching messages? I don't have any design requirement as such, just curious!!
Posted: Thu Feb 07, 2013 1:54 pm Post subject: Re: MQGET Match message using both MsgId and CorrelId
Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
prasadpav wrote:
I always wondered under what circumstances one would use both the MQGET message match options - MQMO_MATCH_CORREL_ID + MQMO_MATCH_MSG_ID to retrieve messages from a queue. Anyone has any good reasons to use both for matching messages? I don't have any design requirement as such, just curious!!
Thanks in advance.
Think about it. Read about it.
MSG_IDs usually do not ever match CORREL_IDs. A CORREL_ID is most often used in a request-reply pattern to match the MSG_ID of the original request to the reply of the service component. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Did that alot!!! Still didn't understand a practical scenario where one would design an application to match messages using both MsgId & CorrelId.
Quote:
MSG_IDs usually do not ever match CORREL_IDs. A CORREL_ID is most often used in a request-reply pattern to match the MSG_ID of the original request to the reply of the service component.
I know that MSG_IDs and CORREL_IDs do not match and one would typically use a combination of both MsgId or correlid based on the report options setting in the request. But my question is - why would anyone use MsgId and correlId to match messages? Because both MQ Application API reference document and MQGET node match properties suggests that both can be used together. Surely there must be a compelling reason behind it.
Did that alot!!! Still didn't understand a practical scenario where one would design an application to match messages using both MsgId & CorrelId.
One decides to implement one's own form of message grouping/segmentation and uses the MsgId to hold the group identifier and the correlId to hold the segment identifier.
I do not say this is a *good* design, but at least by some standards and in some circumstances it *could* be considered "practical".
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