Reputation: 433
I'm trying to connect to MQ Series 8 using c#. I'm using the next code :
try{
MQEnvironment.Hostname = "xxx";
MQEnvironment.Channel = "xxx";
MQEnvironment.Port = 111;
MQEnvironment.properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT);
MQQueueManager mqmm = new MQQueueManager(queueManagerName);
}catch(Exception e){Console.WriteLine("Error : "+e);}
How can i set a timeOut connection in this case ?
Thanks in advance.
Upvotes: 1
Views: 974
Reputation: 15283
You can set the socket time out via the Connect_Timeout
parameter under the TCP stanza in mqclient.ini file. Since socket is a machine resource, connection timeout needs to be set in mqclient.ini file and the change will affect all MQ connections originating from that machine.
See here: http://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm.mq.con.doc/q016910_.htm
Upvotes: 1