我有一个代理here
代理的传输是JMS。代理从jms发出消息,然后通过http向后端发送消息。在后端应答之后,代理会将回复发送回JMS。
一切运作良好。
有时候后端会处理超过30秒的邮件。在这种情况下,代理无法发回回复。
wso2carbon.log包含
TID:[0] [ESB] [2015-04-28 09:32:42,250]错误 {org.apache.axis2.transport.jms.JMSSender} - 无法创建 JMSMessageSender用于: org.apache.axis2.transport.jms.JMSOutTransportInfo@3b486731 {} org.apache.axis2.transport.jms.JMSSender org.apache.activemq.DestinationDoesNotExistException:目的地 temp-queue:// ID:debcat-ng.hq.cinvest.chel.su-48732-1429525869210-13397:1:1不存在。
在 arg.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:148) 在org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:277) 在org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145) 在org.apache.activemq.advisory.AdvisoryBroker.addDestination(AdvisoryBroker.java:174) 在org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145) 在org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145) 在org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151) 在org.apache.activemq.broker.region.RegionBroker.addProducer(RegionBroker.java:324) 在org.apache.activemq.broker.jmx.ManagedRegionBroker.addProducer(ManagedRegionBroker.java:252) 在org.apache.activemq.broker.BrokerFilter.addProducer(BrokerFilter.java:93) 在org.apache.activemq.advisory.AdvisoryBroker.addProducer(AdvisoryBroker.java:162) 在org.apache.activemq.broker.CompositeDestinationBroker.addProducer(CompositeDestinationBroker.java:56) 在 org.apache.activemq.broker.BrokerFilter.addProducer(BrokerFilter.java:93) 在org.apache.activemq.broker.MutableBrokerFilter.addProducer(MutableBrokerFilter.java:99) at org.apache.activemq.broker.TransportConnection.processAddProducer(TransportConnection.java:566) 在org.apache.activemq.command.ProducerInfo.visit(ProducerInfo.java:105) 在org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:329) 在 org.apache.activemq.broker.TransportConnection $ 1.onCommand(TransportConnection.java:184) 在 org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50) 在 org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113) 在 org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:288) 在 org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83) 在 org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214) 在 org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196) 在java.lang.Thread.run(Thread.java:662)TID:[0] [ESB] [2015-04-28 09:32:42,253]错误{org.apache.synapse.core.axis2.Axis2Sender} - 发回消息时出现意外错误 {} org.apache.synapse.core.axis2.Axis2Sender org.apache.axis2.AxisFault:无法为以下内容创建JMSMessageSender: org.apache.axis2.transport.jms.JMSOutTransportInfo@3b486731 at org.apache.axis2.transport.base.AbstractTransportSender.handleException(AbstractTransportSender.java:226) 在 org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:139) 在 org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:119) 在org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:163) 在 org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:321) 在 org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:94) 在 org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:77) 在 org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:47) 在 org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:131) 在 org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:268) 在 org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:488) 在 org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170) 在org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) 在 org.apache.axis2.transport.base.AbstractTransportSender.handleIncomingMessage(AbstractTransportSender.java:148) 在 ru.chelinvest.wso2esb.transport.XGateSender.sendMessage(XGateSender.java:205) 在 org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112) 在 org.apache.axis2.engine.AxisEngine $ TransportNonBlockingInvocationWorker.run(AxisEngine.java:626) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 在 java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:615) 在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}
无法为以下内容创建JMSMessageSender:org.apache.axis2.transport.jms.JMSOutTransportInfo@3b486731
为什么在处理邮件的时间超过30秒时会发生这种情况?如何扩展超时?
答案 0 :(得分:0)
检查一下:
http://stackoverflow.com/questions/29383755/connection-timeout-after-request-is-read-in-wso2-esb
http://stackoverflow.com/questions/22694671/wso2-esb-connection-timeout-tuning
http://stackoverflow.com/questions/21234087/wso2-esb-how-to-increase-endpoint-timeout
您是在Windows或Linux上运行此ESB吗?如果Windows是什么样的?
答案 1 :(得分:0)
我找到了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>