I am trying to set the MQCD structure properties - specifically HeartBeatInterval using XMS.NET API.
Background: I have client applications (in .NET) using XMS.NET API to read messages from WebSphere MQ. I use the ClientAcknowledge mode. If the client reads the message and does not ack it, WebSphere MQ waits for 300 seconds before timing out and makes (backout) the message available in the original queue for other clients to read the message.
Task: I want to lower the timeout from 300 seconds.
Our MQ Admin suggested to change the HearBeatInterval property on the channel. But changing it is making no difference.
Apparently, somehow setting the Channel's HeartBeatInterval property on client side (along with the server side channel setting) will make it work. I am attempting to set this value in the client application. But the XMS API does not have a property that corresponds to MQCD.HeartBeatInterval property
Any insight in accomplishing this task of lowering the message ack timeout? or even setting the HeartBeatInterval on the client side - if that's the way to do it.
Certainly it is true that the actual negotiated value of heartbeat interval will takes the biggest number out of the client side and server side heartbeat values, I.e. will use the least frequent interval. If you want a shorter interval you will need to change both ends.
Rather than coding it in your application, why not use a CCDT? This is more flexible should you change you mind about the value to use and want to lower it or raise it in the future.
Further Reading
I think you can use the Disconnect interval(
DISCINT
) attribute of the server connection channel to terminate connections from applications that are hanging. By defaultDISCINT
is set to 0 which means it's disabled. You can set a value that suits your requirement. Read more here: http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.ref.con.doc/q081860_.htmHere is a sample snippet for using CCDT in XMS .NET application.