WSO2 ESB 4.8.1 作为 JMS 消费者超时

timeout of WSO2 ESB 4.8.1 as a JMS Consumer

我有一个代理here

代理的传输是JMS。代理从 jms 提供消息,然后通过 http 将消息发送到后端。后端回答后,代理将回答发送回 JMS。

一切正常。

有时后端处理消息的时间超过 30 秒。在这种情况下,代理无法发回响应。

wso2carbon.log 包含

TID: [0] [ESB] [2015-04-28 09:32:42,250] ERROR {org.apache.axis2.transport.jms.JMSSender} - Unable to create a JMSMessageSender for: org.apache.axis2.transport.jms.JMSOutTransportInfo@3b486731 {org.apache.axis2.transport.jms.JMSSender} org.apache.activemq.DestinationDoesNotExistException: The destination temp-queue://ID:debcat-ng.hq.cinvest.chel.su-48732-1429525869210-13397:1:1 does not exist.
at arg.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:148) at org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:277) at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145) at org.apache.activemq.advisory.AdvisoryBroker.addDestination(AdvisoryBroker.java:174) at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145) at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145) at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151) at org.apache.activemq.broker.region.RegionBroker.addProducer(RegionBroker.java:324) at org.apache.activemq.broker.jmx.ManagedRegionBroker.addProducer(ManagedRegionBroker.java:252) at org.apache.activemq.broker.BrokerFilter.addProducer(BrokerFilter.java:93) at org.apache.activemq.advisory.AdvisoryBroker.addProducer(AdvisoryBroker.java:162) at org.apache.activemq.broker.CompositeDestinationBroker.addProducer(CompositeDestinationBroker.java:56) at org.apache.activemq.broker.BrokerFilter.addProducer(BrokerFilter.java:93) at org.apache.activemq.broker.MutableBrokerFilter.addProducer(MutableBrokerFilter.java:99) at org.apache.activemq.broker.TransportConnection.processAddProducer(TransportConnection.java:566) at org.apache.activemq.command.ProducerInfo.visit(ProducerInfo.java:105) at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:329) at org.apache.activemq.broker.TransportConnection.onCommand(TransportConnection.java:184) at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50) at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113) at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:288) at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83) at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196) at java.lang.Thread.run(Thread.java:662) TID: [0] [ESB] [2015-04-28 09:32:42,253] ERROR {org.apache.synapse.core.axis2.Axis2Sender} - Unexpected error sending message back {org.apache.synapse.core.axis2.Axis2Sender} org.apache.axis2.AxisFault: Unable to create a JMSMessageSender for : org.apache.axis2.transport.jms.JMSOutTransportInfo@3b486731 at org.apache.axis2.transport.base.AbstractTransportSender.handleException(AbstractTransportSender.java:226) at org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:139) at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:119) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:163) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:321) at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:94) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:77) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:268) at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:488) at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.axis2.transport.base.AbstractTransportSender.handleIncomingMessage(AbstractTransportSender.java:148) at ru.chelinvest.wso2esb.transport.XGateSender.sendMessage(XGateSender.java:205) at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112) at org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker.run(AxisEngine.java:626) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724)

关键行是:

org.apache.activemq.DestinationDoesNotExistException:目的地 temp-queue://ID:debcat-ng.hq.cinvest.chel.su-48732-1429525869210-13397:1:1 不存在。

发回消息时发生意外错误 {org.apache.synapse.core.axis2.Axis2Sender}

无法为 org.apache.axis2.transport.jms.JMSOutTransportInfo@3b486731

创建 JMSMessageSender

为什么处理一条消息的时间超过30秒会出现这种情况?我怎样才能延长超时时间?

我找到了 class JMSSender at github。显然,我应该定义一个 属性 JMS_WAIT_REPLY。我已经在发送方的端点中定义了它。扩展了临时队列的响应超时。 这是我发送的端点:

<endpoint xmlns="http://ws.apache.org/ns/synapse" name="xgate">
   <address uri="jms:/....">
      <suspendOnFailure>
         <progressionFactor>1.0</progressionFactor>
      </suspendOnFailure>
      <markForSuspension>
         <retriesBeforeSuspension>0</retriesBeforeSuspension>
         <retryDelay>0</retryDelay>
      </markForSuspension>
      <timeout>
         <duration>60000</duration>
         <responseAction>fault</responseAction>
      </timeout>
   </address>
   <property name="CHARACTER_SET_ENCODING" value="Windows-1251" scope="axis2"/>
   <property name="CONNECTION_TIMEOUT" value="120000" scope="default"/>
   <property name="messageType" value="application/xml" scope="axis2"/>
   <property name="JMS_WAIT_REPLY" value="60000" scope="axis2"/>
   <property name="SO_TIMEOUT" value="120000" scope="default"/>
</endpoint>