IBM MQ - Message Listener create 2 connections by default

Viewed 116

Developed a Spring Boot Application, which comprises of JMS Message Listener which is listening the JMS Queue. Before starting of the Spring Boot Application, the connection usage in the IBM MQ Server is 24. After starting up the Spring boot application, connection size is incremented to 26, that is 2 connection is created. But I was expecting only one connection has to be created in this case. PSB the connection details

DEV.APP.SVRCONN,,127.0.0.1,,,,,,,NONE,IBM MQ Channel,jmslistener-1.0-SNAPSHOT.jar DEV.APP.SVRCONN,,127.0.0.1,,,,,REQ_QUEUE_A,QUEUE,ACTIVE,IBM MQ Channel,jmslistener-1.0-SNAPSHOT.jar

Seems the first connection is created for connecting to MQ Channel. I wasn't sure, whether this is the expected behaviour. Can anyone help me to understand on the connection creation and usage pattern in IBM MQ?

1 Answers

Each JMS "Connection" and each JMS "Session" correspond to a separate MQ Connection. So a simple JMS listener (usually 1 connection+1 session) is likely to result in 2 MQ connections as you've seen.

Related