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 » [Solved] Unable to get more than 1 message from Queue

Post new topic  Reply to topic
 [Solved] Unable to get more than 1 message from Queue « View previous topic :: View next topic » 
Author Message
jessie
PostPosted: Fri Sep 26, 2003 12:00 am    Post subject: [Solved] Unable to get more than 1 message from Queue Reply with quote

Newbie

Joined: 25 Sep 2003
Posts: 4

Hi All,

I am writing a VB program to put and get messages from a local Queue using MQ ActiveX interface. My program can put messages to a queue successfully and is able to get all the messages (one-at-a-time) in return without having to close my program.

However, when i tried to use my program to retrieve the messages created by API Exerciser, my program is only able to get 1 message and my 2nd get attempt will always return a NO MESSAGE available. If i close and restart my program, then i am able to get 1 more message which is suppose to be my 2nd message for the first attempt. It seems that i am limited to issueing 1 get for each program run.

Can anyone help me ?

Thanks,
Jessie
Back to top
View user's profile Send private message
bob_buxton
PostPosted: Fri Sep 26, 2003 12:11 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

Are you resetting the message id and correlid back to none before your sceond get? If not MQ is trying to retrieve a message with the same ids as the previous message.
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
jessie
PostPosted: Fri Sep 26, 2003 12:32 am    Post subject: Reply with quote

Newbie

Joined: 25 Sep 2003
Posts: 4

Hi Bob,

Thanks for the advice. It does solve my problem...

BTW, i saw a lot of reference from the manual about these two properties - CorrelationID & MessageID, when would i use them ? Currently, i just set them to null.

Cheers,
Jessie
Back to top
View user's profile Send private message
bower5932
PostPosted: Mon Sep 29, 2003 10:27 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

The message id and correlation id come in handy when you are sending messages back and forth between a client application and a server application. The client can have MQ generate a unique message id that gets sent to the server. The server can them move the message id to the correlation id and reply back. Your client can then get the reply by looking for the message that has its message id in the correlation id.

There are some details in the Application Programming Reference.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » [Solved] Unable to get more than 1 message from 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.