Spring JMS侦听器 - 容器侦听器设置超时

时间:2014-09-11 02:31:31

标签: spring jms ibm-mq spring-integration spring-jms

我最近从3.1升级到4.1版,jms:listener-container似乎在重试设置监听器之前似乎没有等待超时,就像3.1中一样。我已经尝试了recovery-interval="10000",它仍在尝试每秒3次。

这是我的春季配置部分:

<jms:listener-container recovery-interval="10000" connection-factory="connectionFactory">
    <jms:listener destination="${myQueueDestination}" ref="myListener" />
    <!-- many others -->
</jms:listener-container>

我在4.1上的日志看起来像那样(见时间):

11/09 11:56:33 WARN  [org.springframework.jms.listener.DefaultMessageListenerContainer] Setup of JMS message listener invoker failed f or destination 'MYQUEUE.NAME' - trying to recover. Cause: MQJMS2008: failed to open MQ queue ''.; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2085'.
11/09 11:56:33 WARN  [org.springframework.jms.listener.DefaultMessageListenerContainer] Setup of JMS message listener invoker failed for destination 'MYQUEUE.NAME' - trying to recover. Cause: MQJMS2008: failed to open MQ queue ''.; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2085'.
11/09 11:56:34 WARN  [org.springframework.jms.listener.DefaultMessageListenerContainer] Setup of JMS message listener invoker failed f (...)

3.1看起来像这样(见5秒延迟):

11/09 12:14:32 WARN  [org.springframework.jms.listener.DefaultMessageListenerContainer] Setup of JMS message listener invoker failed for destination 'MYQUEUE.NAME' - trying to recover. Cause: MQJMS2008: failed to open MQ queue ''.; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2085'.
11/09 12:14:37 WARN  [org.springframework.jms.listener.DefaultMessageListenerContainer] Setup of JMS message listener invoker failed for destination 'MYQUEUE.NAME' - trying to recover. Cause: MQJMS2008: failed to open MQ queue ''.; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2085'.
11/09 12:14:43 WARN  [org.springframework.jms.listener.DefaultMessageListenerContainer] Setup of JMS message listener invoker failed for destination 'MYQUEUE.NAME' - trying to recover. Cause: MQJMS2008: failed to open MQ queue ''.; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2085'.

当队列备份时,一切正常。这些超时设置是否可用于配置?

此致

1 个答案:

答案 0 :(得分:3)

这绝对看起来像是对我的回归,也是我昨天偶然发现的事情。我创建了this issue来跟踪该问题。