Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>What version of MQ are you using? For automatic reconnection to work the queue manager need to be at least at MQ v701 and MQ .NET client needs to be a MQ v7.1 level. </p> <p>Assuming you are using MQ v7.1 .NET client, you need to specify reconnect option during connection create. You will need to enable reconnection by adding something like:</p> <pre><code>props.Add(MQC.CONNECT_OPTIONS_PROPERTY, MQC.MQCNO_RECONNECT); </code></pre> <p>Reconnection can be enabled/disabled from mqclient.ini file also.</p> <p>But what is surprising is why the Get/Put are hanging when there is no network connection. Hope you are not connecting a queue manager running on the same machine as your application. There is no need to set any timer or something like that. You can issue MQ calls and if there is anything wrong with connection, an exception will be thrown.</p> <p>Update:</p> <p>I think you are referring to <code>IsConnected</code> property of <code>MQQueueManager</code> class. The documentation says the value of this property: "If true, a connection to the queue manager has been made, and is not known to be broken. Any calls to IsConnected do not actively attempt to reach the queue manager, so it is possible that physical connectivity can break, but IsConnected can still return true. The IsConnected state is only updated when activity, for example, putting a message, getting a message, is performed on the queue manager. If false, a connection to the queue manager has not been made, or has been broken, or has been disconnected."</p> <p>As you can see a <code>True</code> value does not mean the connection is still ON. My suggestion would be to call a method, Put/Get and handle any exception thrown.</p> <p>Put/Get/Disconnect calls hanging appears to be a problem. My suggestion would be raise a PMR with IBM.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload