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 » WebSphere Message Broker (ACE) Support » MQGET Match message using both MsgId and CorrelId

Post new topic  Reply to topic
 MQGET Match message using both MsgId and CorrelId « View previous topic :: View next topic » 
Author Message
prasadpav
PostPosted: Thu Feb 07, 2013 1:43 pm    Post subject: MQGET Match message using both MsgId and CorrelId Reply with quote

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!!

Thanks in advance.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Feb 07, 2013 1:54 pm    Post subject: Re: MQGET Match message using both MsgId and CorrelId Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
prasadpav
PostPosted: Thu Feb 07, 2013 2:15 pm    Post subject: Reply with quote

Centurion

Joined: 03 Oct 2004
Posts: 142

Quote:
Think about it. Read about it.


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.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Feb 07, 2013 2:40 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

prasadpav wrote:
Quote:
Think about it. Read about 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".
Back to top
View user's profile Send private message
prasadpav
PostPosted: Thu Feb 07, 2013 2:50 pm    Post subject: Reply with quote

Centurion

Joined: 03 Oct 2004
Posts: 142

Thanks mqjeff. That sounds like a valid scenario.
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 » WebSphere Message Broker (ACE) Support » MQGET Match message using both MsgId and CorrelId
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.