|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Error while getting msg from a queue when it's empty(VB.net) |
« View previous topic :: View next topic » |
Author |
Message
|
vandemon |
Posted: Tue Jul 06, 2010 7:09 pm Post subject: Error while getting msg from a queue when it's empty(VB.net) |
|
|
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 |
|
 |
fatherjack |
Posted: Tue Jul 06, 2010 10:59 pm Post subject: |
|
|
 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 |
|
 |
vandemon |
Posted: Tue Jul 06, 2010 11:19 pm Post subject: |
|
|
Apprentice
Joined: 14 Jun 2010 Posts: 32
|
I did not set it...
I assume it as MQC.MQGMO_NO_WAIT |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jul 07, 2010 3:56 am Post subject: |
|
|
 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 |
|
 |
bruce2359 |
Posted: Wed Jul 07, 2010 6:16 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
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
|
|
|
|