|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
get() method on queue block in case of lost connection |
« View previous topic :: View next topic » |
Author |
Message
|
vonasek |
Posted: Wed Mar 20, 2002 11:28 am Post subject: |
|
|
Newbie
Joined: 19 Mar 2002 Posts: 2 Location: Czech Republic
|
Hi,
after some tests of MQ base Java it seems to us MQQueue.get() method blocks indefinitly if a connection to MQ-Series server gets lost during wait period of the method.
What we do is we run a thread pooling for messages using get() method with timeout of 5 seconds (MQC.MQGMO_WAIT used). Another thread puts messages, both having own queue manager to run in paralel. Simulation of network problems between such a client and MQ-Series is done simply by unplugging network cable.
When the cable is unplugged we would expect one of followings:
- an exception received more less immediatelly at connection break
- an exception received at timeout of get() (different than "NO_MESSAGE_AVAILABLE", code 2033)
Unfortunatelly none of these happens and get() remains blocked. This causes reasonable problems since there's no chance to kill such a thread in Java.
My concern is if anybody had/has a similar problem and would bring some ideas how to avoid this. Thanks. |
|
Back to top |
|
 |
mrlinux |
Posted: Wed Mar 20, 2002 12:26 pm Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Are you using MQ Server to Server Connection or MQClient to server.
If you are using MQ Server to MQServer your application will never see this
issue, This will be taken care of by the channel code.
If you are using MQClient to MQServer you should be able to use the HBINT on
the channel definition to prevent this issue.
_________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
StefanSievert |
Posted: Wed Mar 20, 2002 1:35 pm Post subject: |
|
|
 Partisan
Joined: 28 Oct 2001 Posts: 333 Location: San Francisco
|
|
Back to top |
|
 |
vonasek |
Posted: Mon Mar 25, 2002 1:20 am Post subject: |
|
|
Newbie
Joined: 19 Mar 2002 Posts: 2 Location: Czech Republic
|
OK, thanks very much for that hint with HBINT - that's it.
It looks good when HBINT decreased.
Thanks. |
|
Back to top |
|
 |
abiram8 |
Posted: Fri Mar 29, 2002 3:42 am Post subject: |
|
|
 Master
Joined: 27 Mar 2002 Posts: 207 Location: India
|
Try out MQC.MQGMO_WAIT_UNLIMITED options
Refer manual for correct Syntax
GoodLuck
R.Abiram |
|
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
|
|
|
|