简体   繁体   English

IBM MQ - 消息侦听器默认创建 2 个连接

[英]IBM MQ - Message Listener create 2 connections by default

Developed a Spring Boot Application, which comprises of JMS Message Listener which is listening the JMS Queue.开发了一个 Spring Boot 应用程序,它由正在侦听 JMS 队列的 JMS 消息侦听器组成。 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.在启动 Spring Boot 应用程序之前,IBM MQ Server 中的连接使用量为 24。启动 Spring Boot 应用程序后,连接大小增加到 26,即创建了 2 个连接。 But I was expecting only one connection has to be created in this case.但我期望在这种情况下只需要创建一个连接。 PSB the connection details PSB 连接细节

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 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 通道,jmslistener-1.0-SNAPSHOT.jar

Seems the first connection is created for connecting to MQ Channel.似乎第一个连接是为连接到 MQ 通道而创建的。 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?谁能帮助我了解 IBM MQ 中的连接创建和使用模式?

Each JMS "Connection" and each JMS "Session" correspond to a separate MQ Connection.每个 JMS“连接”和每个 JMS“会话”对应一个单独的 MQ 连接。 So a simple JMS listener (usually 1 connection+1 session) is likely to result in 2 MQ connections as you've seen.因此,如您所见,一个简单的 JMS 侦听器(通常是 1 个连接+1 个会话)可能会导致 2 个 MQ 连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM