【问题标题】:JMS MQ Channels keep increasing and exhaustedJMS MQ 通道不断增加和耗尽
【发布时间】:2019-06-16 11:14:28
【问题描述】:

我已经在 WebSphere 管理控制台中配置了 queueconnection factory,并使用 jndi 查找来使用它。 WebSphere Application Server 中的 MQ 队列连接工厂具有设置。连接池最大大小为 30,会话池最大大小为 20

这些不是用于几个 jms:message-driven-channel-adapter 或 jms 通道或 jms:inbound-channel-adapter 作为我在我的应用程序中的各种 spring 集成工作流的一部分。 在一段时间内,我们看到 MQ 通道上的连接数不断增加到允许的最大值(大约 1800)。一旦我们反弹服务器,连接数就会恢复到低于 50 的正常水平。

  1. 是否缺少任何设置?
  2. 如何确定 JMS 会话池是否正在关闭/释放?

感谢任何帮助

<jee:jndi-lookup id="queueConnectionFactory" jndi-name="$env{Queue.ConnectionFactory}"  />


<si-jms:message-driven-channel-adapter
    id="messageDrivenAdapter" channel="routingChannel" 
    container="messageListenerContainer" />


<bean id="messageListenerContainer"
    class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    <property name="connectionFactory" ref="queueConnectionFactory" />
    <property name="destination" ref="inQueue" />
    <property name="transactionManager" ref="txManager" />
    <property name="taskExecutor" ref="MQExecutor" />
</bean>


   <si-jms:channel id="regChannel" queue="regQueue" connection-factory="queueConnectionFactory" transaction-manager="txManager" task-executor="regtaskExecutor" />  

【问题讨论】:

    标签: spring-integration


    【解决方案1】:

    过去我们在 WebSphere 上使用 Spring Integration 时,我们有一个这样的 bean:

    <bean id="connectionFactory" class="org.springframework.jms.connection.DelegatingConnectionFactory">
        <property name="targetConnectionFactory">
            <jee:jndi-lookup jndi-name="someConnectionFactory"/>
        </property>
        <property name="shouldStopConnections" value="true"/>
    </bean>
    

    看看能不能帮到你!

    【讨论】:

    • 谢谢。我们会努力回来的。该选项与连接有关,但看起来我对 JMS 会话池有问题。无论如何要检查 JMS 会话池吗?
    • 我认为我们关闭了连接,它的所有会话也应该被释放。
    猜你喜欢
    • 1970-01-01
    • 2012-08-31
    • 1970-01-01
    • 2012-02-05
    • 2021-03-10
    • 2014-04-15
    • 2013-01-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多