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 » General Discussion » Messages in Queue?

Post new topic  Reply to topic
 Messages in Queue? « View previous topic :: View next topic » 
Author Message
bath
PostPosted: Tue Dec 28, 2004 3:26 am    Post subject: Messages in Queue? Reply with quote

Apprentice

Joined: 23 Nov 2004
Posts: 29

Hello,
please could you give some help on this?
Is it a way to know if a message is in the queue before reading it?
or how do I use queue.get only if there is a message ?

My problem is that I write two programs in c++
one of the program put message in the queue and the other get this message from the queue.
the first program can put an unlimited number of messages in the queue, but in the second program I can only read the first message !!!
and not the others

how do I get all the messages from the queue?

do I have to write a loop when getting the messages?

can some one give me a sample code?

any help will be greatly appreciated,
roland
Back to top
View user's profile Send private message
bath
PostPosted: Tue Dec 28, 2004 4:55 am    Post subject: Reply with quote

Apprentice

Joined: 23 Nov 2004
Posts: 29

I saw that I can use
while(myqueue.completionCode() !=MQCC_FAILED){

}
to read all the messages from the queue.

is this correct?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Dec 28, 2004 5:25 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Have you found the sample code yet?

It should answer most of your questions.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
bath
PostPosted: Tue Dec 28, 2004 5:35 am    Post subject: Reply with quote

Apprentice

Joined: 23 Nov 2004
Posts: 29

thanks i have found samples code
roland
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 » General Discussion » Messages in Queue?
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.