我们正面临一个问题,即wso2 ESB端点在其尝试调用的URL不能使用一秒钟时会暂停3000ms,因为这种暂停,即使后端URL可用,对同一端点的下一次调用也会失败。
下面是相同的记录端点挂起时我们得到的信息,以及我们现在正在使用的端点配置。
TID: [-1234] [] [2019-10-30 15:08:39,121] WARN {org.apache.synapse.endpoints.EndpointContext} - Endpoint : conf//endpoint/epsomebackendurl with address https://somebackendurl.com will be marked SUSPENDED as it failed
TID: [-1234] [] [2019-10-30 15:08:39,121] WARN {org.apache.synapse.endpoints.EndpointContext} - Suspending endpoint : conf//endpoint/epsomebackendurl with address https://somebackendurl.com - current suspend duration is : 30000ms - Next retry after : Wed Oct 30 15:09:09 GMT 2019
Endpoint Configuration
<?xml version="1.0" encoding="UTF-8"?>
<endpoint xmlns="http://ws.apache.org/ns/synapse"
name="conf//endpoint/epsomebackendurl">
<property name="System-Name" value="JUNIFER" scope="default"
type="STRING"/>
<http uri-template="https://somebackendurl.com"
method="get">
<suspendOnFailure>
<progressionFactor>1.0</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
<retryDelay>0</retryDelay>
</markForSuspension>
</http>
</endpoint>
请让我知道,我们还有其他选择可以阻止endpint挂起。
我们正在使用wso2esb-5.0.0版本。
谢谢
答案 0 :(得分:1)
默认行为是使Synapse端点的请求出错,该端点将挂起30000ms。
如果要停止挂起,则永远不会挂起以下端点。
<endpoint name="NoSuspendEndpoint">
<address uri="http://localhost:9000/services/SimpleStockQuoteService">
<timeout>
<duration>30000</duration>
<responseAction>fault</responseAction>
</timeout>
<suspendOnFailure>
<errorCodes>-1</errorCodes>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<errorCodes>-1</errorCodes>
</markForSuspension>
</address>