Contact Us 1-800-596-4880

Using ADMIN.QUEUE to Refresh Connections

IBM MQ Connector provides a special administrative queue, ADMIN.QUEUE, that allows you to refresh the connection or reconnect listeners during runtime. This can be useful for maintenance or error recovery without stopping the Mule application.

Triggering Connection Refreshes

The ADMIN.QUEUE destination can be used within the Publish operation to initiate a connection refresh. This operation helps you dynamically manage connection disruptions and improves the resilience of your application.

<flow name="trigger-refresh-flow">
    <ibm-mq:publish config-ref="IBMMQ_Config"
                    destination="ADMIN.QUEUE"
                    destinationType="QUEUE">
        <ibm-mq:message-builder>
            <ibm-mq:text-payload value="Trigger connection refresh"/>
        </ibm-mq:message-builder>
    </ibm-mq:publish>
</flow>

Configuration Requirements

Ensure you have a valid IBM MQ configuration that includes the correct connection details:

<ibm-mq:config name="IBMMQ_Config" host="your-mq-host" port="1414" queue-manager="QM1" channel="YOUR.CHANNEL" user="mq_user" password="mq_password"/>

This configuration is referenced in the Publish operation that targets the ADMIN.QUEUE.

Important Considerations

  • The ADMIN.QUEUE is reserved for administrative purposes and must be secured.

  • Only trusted users or applications must be allowed to publish messages to this queue.

  • Refreshing the connection might temporarily interrupt message processing but helps recover from network failures or other runtime issues.

View on GitHub