|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
[Solved] MQSeries Listener Problem |
« View previous topic :: View next topic » |
Author |
Message
|
bbcai |
Posted: Wed Jan 29, 2003 1:48 pm Post subject: [Solved] MQSeries Listener Problem |
|
|
Newbie
Joined: 29 Jan 2003 Posts: 3
|
i am using ibm MQSeries 5.2 and jms for a new application. i wrote a sender and a listener program. the application is working fine, except in one situation: if i start listener first and there is no messages in the queue, when sender sends messages, the listener will pick them all up from the queue, then through excpetion. i got return code 2, with error code 2033. however, if at the time listener starts, if there are messages in the queue(even one), it will pick it up and keep listener, whenever message arrives, it will pick it with no exceptions thrown. the error message says that a MQGet() issued but message is not there. i don't understand why my listener work in one situation but not the other. i don't know if there is some classes or methods in jms to check if the queue is empty. could anyone with this experience help me out?
thanks very much! |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Jan 30, 2003 6:21 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
The 2033 simply indicates that there isn't a message available to be gotten. You can specify a timeout on your receive indicating how long you want to wait. I would guess that depending on how fast/slow your sender is sending messages, your listener happens to be able to get/not get a message and either gets or doesn't get the 2033. |
|
Back to top |
|
 |
bbcai |
Posted: Thu Jan 30, 2003 8:58 am Post subject: |
|
|
Newbie
Joined: 29 Jan 2003 Posts: 3
|
i am using queuelistener and all my code goes to onMessage(). the exception happens at MQQueueReceiver.receiveAsyc(). it complains about not catching exception. however, when i use message listener, i do not call receive() at all. mq did something at back which i don't have control. i can only catch exceptions thrown by jms. i tried to check if queue is empty at the end of reading message, still doesn't work. i have no control how onMessage() is called, that's the problem. |
|
Back to top |
|
 |
bbcai |
Posted: Fri Jan 31, 2003 8:14 am Post subject: fixed |
|
|
Newbie
Joined: 29 Jan 2003 Posts: 3
|
i just got this problem fixed. what i did is to seperate my sender code and move it to another queue manager in another box and have the two queue manager talk to each other, and everything works fine. i think very likely this is a vaj bug problem. i had the same problem before. something worked fine in command line but not in vaj.
thanks very much for you help!
ben |
|
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
|
|
|
|