|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
C Api / get messages with generic corr ID |
« View previous topic :: View next topic » |
Author |
Message
|
mqbpi |
Posted: Fri Apr 04, 2014 3:22 am Post subject: C Api / get messages with generic corr ID |
|
|
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 |
|
 |
Vitor |
Posted: Fri Apr 04, 2014 4:41 am Post subject: Re: C Api / get messages with generic corr ID |
|
|
 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 |
|
 |
RogerLacroix |
Posted: Fri Apr 04, 2014 9:07 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 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 |
|
 |
Vitor |
Posted: Fri Apr 04, 2014 9:30 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|