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 API Support » C Api / get messages with generic corr ID

Post new topic  Reply to topic
 C Api / get messages with generic corr ID « View previous topic :: View next topic » 
Author Message
mqbpi
PostPosted: Fri Apr 04, 2014 3:22 am    Post subject: C Api / get messages with generic corr ID Reply with quote

Newbie

Joined: 04 Apr 2014
Posts: 3

Hello:



We have a queue that receives messages with specific correlation IDs (for example A and B).

What could be the best way to build a program that gets all the messages that have different correlation IDs from A and B?

Could we do something like this?
(if correlId != A or correlID != B then Get MSG)

Thank you!
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Apr 04, 2014 4:41 am    Post subject: Re: C Api / get messages with generic corr ID Reply with quote

Grand High Poobah

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

mqbpi wrote:
Could we do something like this?
(if correlId != A or correlID != B then Get MSG)


No.

Correlation IDs are intended to identify specific messages (typically replies) and (because it's not a character field) shouldn't be used to hold specific character values.

If you're trying to pick out specific classes of message ("type A", "type B", "neither A nor B") you should hold the data somewhere else and use other message selection techniques. One possible example would be an XMS selector. Anpther would be to pub/sub rather than get/put.

Neither example is asserted to be the best, nor are these the only options.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Fri Apr 04, 2014 9:07 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3252
Location: London, ON Canada

If different applications are processing messages with different CorrelIDs then why not just use separate queues? Why throw everything it a big giant bucket when many small buckets work better?

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Fri Apr 04, 2014 9:30 am    Post subject: Reply with quote

Grand High Poobah

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

RogerLacroix wrote:
If different applications are processing messages with different CorrelIDs then why not just use separate queues? Why throw everything it a big giant bucket when many small buckets work better?




An example of another option
_________________
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 API Support » C Api / get messages with generic corr 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.