【问题标题】:Camel JMS : connection refresh not working (IBM MQ)Camel JMS:连接刷新不起作用(IBM MQ)
【发布时间】:2022-08-19 23:56:51
【问题描述】:

我正在使用以下端点:

jms:queue:MY_JMS_QUEUE?transacted=true&recoveryInterval=10000&testConnectionOnStartup=true

一切正常,但只要 MQ 连接丢失(由于 IBM MQ 服务器重新启动),连接刷新就不起作用。

在我的日志中,我有:

ERROR [c.c.j.DefaultJmsMessageListenerContainer] []] Could not refresh JMS Connection for destination \'MY_JMS_QUEUE\' - retrying using FixedBackOff{interval=10000, currentAttempts=0, maxAttempts=unlimited}. Cause: JMSWMQ0018: Failed to connect to queue manager \'xxx\' with connection mode \'Client\' ......(\'MQRC_Q_MGR_NOT_AVAILABLE\')

仅此而已,我期望在当前尝试= 1 然后是 2 时多次出现相同的错误消息...直到 MQ 回来。

我检查了文档,但我没有看到任何其他内容。我的配置:

Camel version : 3.11.3
Java: 11.0.8 
Spring boot : 2.5.2
  • 如果您将交易设置为 false 会发生什么?当 transacted 设置为 true 时,DMLC 不管理 JMS 连接,因此在重新连接尝试时不会刷新它。如果您为 IBM MQ 类启用 TRACE 级别的日志记录,我怀疑您会看到相同的(现在断开的)JMS 连接正在使用但未刷新。

标签: spring-boot apache-camel ibm-mq


【解决方案1】:

由于您的连接模式是“客户端”,您可以尝试使用 MQ 自动 JMS 客户端重新连接功能。您需要在连接工厂定义中配置“ClientReconnectOptions”。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-05
    • 2019-12-31
    • 1970-01-01
    • 2016-06-23
    • 2020-04-23
    • 1970-01-01
    • 2017-06-05
    • 2021-08-04
    相关资源
    最近更新 更多