IBM MQ : Any way to get connection interruption notification?

Anuj Khandelwal

I am using IBM MQ-7.5. I am running a jms client which connects to the manager running on some other hosts.

I want to monitor the TCP connections with the manager. How do I get notified if my client connection is broken with the manager ? Is there any callback or listener provided in IBM MQ APIs to know any interruption on connection ?

Eg. Like ActiveMQ has



Do you want to monitor client application connections at the queue manager end or in the client application?

To get notified of any connection issues, MQ JMS client has an ExceptionListener that can be attached to MQConnection. This exception listener will be invoked when there is an issue with connection to queue manager, for example connection to queue manager is broken. More details here: View details of setExceptionListener method. Call the setExceptionListener method on MQConnection to register a callback as shown below.

  MQQueueConnectionFactory cf = new MQQueueConnectionFactory();
  ExceptionListener exceptionListener = new ExceptionListener(){
                public void onException(JMSException e) {
                    if(e.getLinkedException() != null)
 MQQueueConnection connection = (MQQueueConnection) cf.createQueueConnection();

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at


Login to comment


Any way to change message format in MQ Console (IBM MQ docker)?

Get IBM MQ connection factory in my spring boot application

IBM MQ: Establishing an SSL connection

Command to Replace Connection Name in IBM MQ

JmsTemplate with CachingConnectionFactory Connection Recovery for IBM MQ Queue

IBM MQ - Java api - PCFMessageAgent - connection fails

Reconnecting to IBM MQ Queue on connection failure

IBM MQ 2538 error negotiating an SSL connection

Establish connection between IBM MQ and ActiveMQ

Config connection node js app with IBM MQ

Program to create a connection and access IBM MQ 7

queueBrowser.GetEnumerator() doesnt get any messages | IBM MQ XMS C# client

Get the Message Type in JMS - IBM MQ

IBM MQ: reconnect to message broker in case of connection error after startup

How to use the userId in MQCSP for IBM MQ connection authentication in C client

Connecting to IBM MQ without any IBM dependency jars from java client

Unable to get the dashboard of IBM websphere MQ in Azure Kubernetes

IBM MQ get topic name from message in subscription queue

How to get default installation directory for IBM MQ in linux and unix?

How to get message constantly from remote IBM MQ

Unable to get message from queue in IBM websphere MQ

Way to Refresh Network Drives due to Disconnection from Pending VPN Connection without Workflow Interruption

Is there any way to specify time zone for scheduled active mq message?

Is there any way to specify custom connection parameters to scalikejdbc?

Is there any way to watch my connection health?

Can you check to see if an IBM MQ topic is up and available through a Java application before attempting to create a connection?

get notification if any akka actor died

what would be the best way to store IBM TAM connection parameters in JAVA?

IBM MQQueue Safest way to get all messages