Camel Transacted:MQ 会话在每次提交时关闭

Camel Transacted: MQ Session closed on every commit

我有:

但是,我收到这条消息:

Setup of JMS message listener invoker failed for destination 'MY.QUEUE' - trying to recover. 
Cause: Local JMS transaction failed to commit; nested exception is com.ibm.msg.client.jms.DetailedIllegalStateException: 
MQJCA1020: The session is closed.
The application attempted to use a JMS session after it had closed the session.
Modify the application so that it closes the JMS session only after it has finished using the session.

这似乎与此 有关,但我尝试更改 server.xml 中的配置,但没有成功。

您可以尝试设置 cacheLevelName=CACHE_CONSUMER,这允许重新使用 JMS 消费者并避免无尽的 creation/destruction JMS 资源,如错误消息所示可能是原因。

您可以在 Camel JMS 文档中了解有关缓存级别重要性的更多信息:http://camel.apache.org/jms