从 JMS 队列 (Websphere MQ) 中提取消息以使用 Mule (v. 2.2.1) 进行进一步处理时,我们会遇到虚假错误。下面我列出了受影响的服务以及 Mule 日志的摘录。第一段,“DispatchThread:1”,是服务按预期工作的情况,第二个,“DispatchThread:6”,消息丢失,即未处理。
如日志所示,消息作为事件排队等待 processFooBar.service 在这两种情况下处理,但在后一种情况下,它永远不会被提取以进行进一步处理。在工作示例中,它几乎立即出列并处理。
我们怀疑这是由于线程配置文件(即接收者线程配置文件等)的不平衡造成的,但同时我们认为这是一个非常模糊的解释。有点担心消息可能会丢失而无影无踪,即使我们增加线程数,如果系统负载增加,我们也可能会遇到同样的问题。
如果我们的怀疑能够得到证实,如果有人遇到同样的问题,我将不胜感激,他们对此做了什么?我们将升级到 Mule 3,但我怀疑这个问题对于 Mule 3 没有什么不同?
服务定义:
<service name="processFooBar">
<inbound>
<jms:inbound-endpoint queue="A.FROM.BAR"
connector-ref="fooConnector"
disableTemporaryReplyToDestinations="true">
<transformers>
<transformer ref="messageLogger"/>
<transformer ref="jmsMessageToObjectTransformer"/>
...
..
</transformers>
</jms:inbound-endpoint>
</inbound>
...
..
</service>
日志提取:
...
..
@ESB-: 2013-06-24 10:31:37,319 DEBUG [DispatchThread: 1] org.mule.service.AbstractService - Service: processFooBar has received asynchronous event on: jms://A.FROM.BAR
@ESB-: 2013-06-24 10:31:37,319 DEBUG [DispatchThread: 1] org.mule.model.seda.SedaService - Service: processFooBar has received asynchronous event on: jms://A.FROM.BAR
@ESB-: 2013-06-24 10:31:37,319 DEBUG [DispatchThread: 1] org.mule.model.seda.SedaService - Service processFooBar putting event on queue processFooBar.service: MuleEvent: ..., endpointEncoding=UTF-8}
@ESB-: 2013-06-24 10:31:37,321 DEBUG [processFooBar.1] org.mule.model.seda.SedaService - Service: processFooBar dequeued event on: jms://A.FROM.BAR
@ESB-: 2013-06-24 10:31:37,331 DEBUG [processFooBar.1] org.mule.model.seda.SedaService - Service processFooBar polling queue processFooBar.service, timeout = 10,000
@ESB-: 2013-06-24 10:31:37,339 DEBUG [processFooBar.2] org.mule.DefaultMuleMessage - new copy of message for Thread[processFooBar.2,5,main]
@ESB-: 2013-06-24 10:31:37,367 DEBUG [processFooBar.2] org.mule.transformer.AbstractTransformer - Setting transformer name to: fooDecoderTransformer
@ESB-: 2013-06-24 10:31:37,368 DEBUG [processFooBar.2] org.mule.transformer.AbstractTransformer - java.lang.Object has been added as source type for this transformer, there will be no source type checking performed
@ESB-: 2013-06-24 10:31:37,368 DEBUG [processFooBar.2] org.mule.transformer.AbstractTransformer - Setting transformer name to: objectToStringTransformer
...
..
@ESB-: 2013-06-24 13:19:51,896 DEBUG [DispatchThread: 6] org.mule.service.AbstractService - Service: processFooBar has received asynchronous event on: jms://FOMS.FROM.FSM.Bar
@ESB-: 2013-06-24 13:19:51,896 DEBUG [DispatchThread: 6] org.mule.model.seda.SedaService - Service: processFooBar has received asynchronous event on: jms://FOMS.FROM.FSM.Bar
@ESB-: 2013-06-24 13:19:51,897 DEBUG [DispatchThread: 6] org.mule.model.seda.SedaService - Service processFooBar putting event on queue processFooBar.service: MuleEvent: ..., endpointEncoding=UTF-8}
...
..