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 » Simple way of going to first msg after each get?

Post new topic  Reply to topic
 Simple way of going to first msg after each get? « View previous topic :: View next topic » 
Author Message
pcelari
PostPosted: Mon Sep 10, 2007 10:12 am    Post subject: Simple way of going to first msg after each get? Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

I wrote a C program to reconciliate logged requests and replies msg on two queues. Since the sequence of msg on both queues are not guaranteed, and I want to avoid using MQGET1 call, I need to move the cursor to the first msg on replyQ after each matching is found and msg removed from the replyQ.

I use Match_CorelId to find and get the msg from replyQ, based on the CorrelId of the msg on requestQ.

Intuitively, I think a regular MQGET call with match option should do just as I need, but I'm not so sure about that. Can anyone clarify this?

thanks a lot.
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Sep 10, 2007 10:44 am    Post subject: Reply with quote

Grand High Poobah

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

An MQGET with any match option will return the "first" matching message, where "first" is determined by the queue's delivery options.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pcelari
PostPosted: Mon Sep 10, 2007 11:05 am    Post subject: Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

Many thanks for clarifying this.
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Sep 10, 2007 11:16 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It seems a lot easier to have the requesting program log an exception when a reply message is not correlated.

It seems a lot of work to have the requesting program log every message it sends, and the server/replier program log every message it sends, and then a third process to decide if something got missed.
_________________
I am *not* the model of the modern major general.
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 » Simple way of going to first msg after each get?
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.