|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQ fails sometimes on a wait on a queue |
« View previous topic :: View next topic » |
Author |
Message
|
deepak |
Posted: Wed Feb 20, 2002 3:26 pm Post subject: |
|
|
Newbie
Joined: 19 Feb 2002 Posts: 2
|
Scenario: I have a java client thread running that opens a connection to a queue manager and a queue. This thread is in a continuous loop where it times out after a wait interval while listening for a message on a queue.
Problem: Sometimes the method call waiting for the message returns abruptly while waiting on a message by throwing an exception as shown below,
javax.jms.JMSException MQJMS2002: failed to get message from MQ queue
Linked JMSException -> Completion Code 2, Reason 2009
The reason code I looked up indicates a MQRC_CONNECTION_BROKEN i.e. connection to queue manager lost whereas the queue manager is always running.
Could a receiver channel going into an inactive state trigger such an exception?
This is quite inconsistent i.e. it could happen twice a day or after 3 days.
Right now I close all connections to the queu manager and queue and reinitiate new connections which seems to solve the problem till it occurs again.
I will appreciate all the help on this.
Thanks,
Deepak |
|
Back to top |
|
 |
pal |
Posted: Thu Feb 21, 2002 12:41 pm Post subject: |
|
|
Apprentice
Joined: 14 Aug 2001 Posts: 35
|
You could always use the isConnected boolean (in the MQQueueManager class) to check whether your connection is still open everytime you wake up ... I know this is not the answer to your question, but it is certainly a viable workaround to the problem. |
|
Back to top |
|
 |
mpuetz |
Posted: Fri Mar 01, 2002 2:31 pm Post subject: |
|
|
Centurion
Joined: 05 Jul 2001 Posts: 149 Location: IBM/Central WebSphere Services
|
Hi,
Your app should always be prepared to handle connection
losses (expecially using network TCP/IP connections) which
can happen for a multitude of reasons.
Hence you should always trap 2009 return codes and prepare
for a complete reconnect, which you apparently do already.
Of course, it might be healthy to find out the actual cause
of the connection losses. You could look into the error logs
of your server which usually give you a low level TCP
protocol error code.
_________________ Mathias Puetz
IBM/Central WebSphere Services
WebSphere Business Integration Specialist |
|
Back to top |
|
 |
ast |
Posted: Sat Mar 02, 2002 5:40 am Post subject: |
|
|
Newbie
Joined: 17 Feb 2002 Posts: 7
|
Hello,
I am experiencing the same problem, but with a twist.
If I create an object of the receiver class in the scope of the running thread listening on the queue, I get the error mentioned. By doing this my application detects if the queue-manager stops etc. But I it also gives me the mentioned problem after app. one minut.
If I create the object of the receiver class outside the scope of the thread, then I am not able to detect whereas the queue is up or down. But I dont get any exceptions.
In the event viewer in Windows it says that to many channels are open. And next I get a tcp/ip error even though the network connection is still up and running.
I think it is weird.
|
|
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
|
|
|
|