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 IBM MQ Support » Error while getting msg from a queue when it's empty(VB.net)

Post new topic  Reply to topic
 Error while getting msg from a queue when it's empty(VB.net) « View previous topic :: View next topic » 
Author Message
vandemon
PostPosted: Tue Jul 06, 2010 7:09 pm    Post subject: Error while getting msg from a queue when it's empty(VB.net) Reply with quote

Apprentice

Joined: 14 Jun 2010
Posts: 32

I face problem in controlling when i tried to get msg from queue...
Code:
Private Sub btnGet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGet.Click
        Dim mqMsg As MQMessage
        Dim mqGetMsgO As MQGetMessageOptions
        mqMsg = New MQMessage()
        mqGetMsgO = New MQGetMessageOptions()
        Try
            mqQueue.Get(mqMsg, mqGetMsgO)
            lstGet.Items.Add(mqMsg.ReadString(mqMsg.MessageLength))
            lstGet.SelectedIndex += 1
            cboAPIRC.Items.Insert(0, "Message successfully get from queue")
            cboAPIRC.SelectedIndex = 0
        Catch ex As MQException
            cboAPIRC.Items.Insert(0, "MQError in getting message from queue")
            cboAPIRC.SelectedIndex = 0
        Catch ex As Exception
            cboAPIRC.Items.Insert(0, "Error in getting message from queue")
            cboAPIRC.SelectedIndex = 0
        End Try
    End Sub


My problem:
When i try to get from queue when it is empty, it should jump to either MQException or Exception right?? But it seems to stuck at
Code:
mqQueue.Get(mqMsg, mqGetMsgO)

and did not jump to MQException or Exception.
Any suggestion???
Back to top
View user's profile Send private message
fatherjack
PostPosted: Tue Jul 06, 2010 10:59 pm    Post subject: Reply with quote

Knight

Joined: 14 Apr 2010
Posts: 522
Location: Craggy Island

Where are you setting the GET wait interval ?
_________________
Never let the facts get in the way of a good theory.
Back to top
View user's profile Send private message
vandemon
PostPosted: Tue Jul 06, 2010 11:19 pm    Post subject: Reply with quote

Apprentice

Joined: 14 Jun 2010
Posts: 32

I did not set it...
I assume it as MQC.MQGMO_NO_WAIT
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 07, 2010 3:56 am    Post subject: Reply with quote

Grand High Poobah

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

vandemon wrote:
I did not set it...
I assume it as MQC.MQGMO_NO_WAIT


Why assume? Why not set it?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed Jul 07, 2010 6:16 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9470
Location: US: west coast, almost. Otherwise, enroute.

Quote:
I assume it as MQC.MQGMO_NO_WAIT

And did you verify your assumption by doing research? Take a look at the WMQ Application Programming Reference for MQGMO. Or the WMQ Constants manual.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
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 IBM MQ Support » Error while getting msg from a queue when it's empty(VB.net)
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.