Mule没有在Openwire连接的ActiveMQ队列上回滚JMS消息

时间:2017-03-29 11:44:21

标签: java jms mule activemq

我们有一个场景,我们使用Mule(版本3.4 - 我知道)在catch异常后回滚JMS事务。 ActiveMQ应该将消息保留在队列中(以使其持久化),直到提交事务,或者在Mule启动回滚后根据回滚设置重新启动。

但是,似乎在回滚之后,消息不会被重新传递并且位于队列连接上并阻塞"进一步的消息就好像没有收到回滚消息一样。有谁知道为什么不退还这个?

从日志中提取:

2017-03-29 11:23:26,345 [Session Task-16] DEBUG SingleResourceCollectionTransaction - Rolling back a transaction collection in the following order: [org.mule.transport.jms.JmsTransaction@bea1685a-1469-11e7-9d1d-5ba5419e6645[status=STATUS_MARKED_ROLLBACK, key=ActiveMQConnection {id=ID:serveradd-50176-1490782511241-3:1,clientId=ID:serveradd-50176-1490782511241-2:1,started=false}, resource=org.mule.transport.jms.ReusableTopicSessionWrapper@c2149e58]]
2017-03-29 11:23:26,345 [Session Task-16] DEBUG SingleResourceCollectionTransaction - Rolling back transaction
2017-03-29 11:23:26,345 [Session Task-16] DEBUG g.mule.transport.jms.JmsTransaction - Rolling back transaction
2017-03-29 11:23:26,345 [Session Task-16] DEBUG g.mule.transport.jms.JmsTransaction - Rolling back transaction: bea1685a-1469-11e7-9d1d-5ba5419e6645
2017-03-29 11:23:26,345 [Session Task-16] DEBUG org.apache.activemq.ActiveMQSession - ID:serveradd-50176-1490782511241-3:1:6 Transaction Rollback, txid:TX:ID:serveradd-50176-1490782511241-3:1:21
2017-03-29 11:23:26,345 [Session Task-16] DEBUG .apache.activemq.TransactionContext - Rollback: TX:ID:serveradd-50176-1490782511241-3:1:21 syncCount: 1
2017-03-29 11:23:26,346 [Session Task-16] DEBUG transaction.TransactionCoordination - Unbinding transaction (14) com.mulesoft.mule.transaction.SingleResourceCollectionTransaction@bea11a39-1469-11e7-9d1d-5ba5419e6645[status=STATUS_ROLLEDBACK, key=null, resource=null]
2017-03-29 11:23:26,346 [Session Task-16] DEBUG n.InterceptingChainLifecycleWrapper - Invoking InterceptingChainLifecycleWrapper 'wrapper for null' 
[ 
  org.mule.api.processor.LoggerMessageProcessor@7e9d1d0b
] with event MuleEvent: 0-bea2c7f2-1469-11e7-9d1d-5ba5419e6645, stop processing=false, jms://myQueue
2017-03-29 11:23:26,347 [Session Task-16] DEBUG .chain.DefaultMessageProcessorChain - Invoking DefaultMessageProcessorChain '(inner iterating chain) of null' 
[ 
  org.mule.api.processor.LoggerMessageProcessor@7e9d1d0b
] with event MuleEvent: 0-bea2c7f2-1469-11e7-9d1d-5ba5419e6645, stop processing=false, jms://myQueue
2017-03-29 11:23:26,347 [Session Task-16] INFO  pi.processor.LoggerMessageProcessor - Rolling back...
2017-03-29 11:23:26,347 [Session Task-16] DEBUG .support.DefaultListableBeanFactory - Returning cached instance of singleton bean '_muleStreamCloserService'
2017-03-29 11:23:26,347 [Session Task-16] DEBUG .support.DefaultListableBeanFactory - Returning cached instance of singleton bean '_muleStreamCloserService'
2017-03-29 11:23:26,347 [Session Task-16] DEBUG ule.util.DefaultStreamCloserService - Unable to find an StreamCloser for the stream type: class net.MyBean, the stream: net.MyBean@e341f050 will not be closed.

1 个答案:

答案 0 :(得分:0)

我对Mule没有工作知识,但是,因为它是JMS / J2EE,所以我会检查重新传输选项mule队列。在将失败消息发送到死信队列之前,有一个属性可以进行N次尝试(我知道activemq有它)。