有人可以向我解释如何启用正确的重试吗?
我有代码
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="HelloWorld" startOnLoad="true" transports="http https" xmlns="http://ws.apache.org/ns/synapse">
<target>
<inSequence>
<call>
<endpoint>
<http method="get" uri-template="http://localhost:8000">
<timeout>
<duration>6000</duration>
<responseAction>fault</responseAction>
</timeout>
<suspendOnFailure>
<initialDuration>1000</initialDuration>
<progressionFactor>2.0</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>3</retriesBeforeSuspension>
<retryDelay>1000</retryDelay>
</markForSuspension>
</http>
</endpoint>
</call>
<log level="full"/>
<respond/>
</inSequence>
<outSequence/>
<faultSequence/>
</target>
</proxy>
[我正在侦听由python -m http.server 8000
创建的python服务器,我只看到一个电话。下次通话是在180秒后。但是我超时60000。
::ffff:127.0.0.1 - - [11/Jun/2020 09:23:29] code 404, message File not found
::ffff:127.0.0.1 - - [11/Jun/2020 09:23:29] "GET /a HTTP/1.1" 404 -
::ffff:127.0.0.1 - - [11/Jun/2020 09:26:29] code 404, message File not found
::ffff:127.0.0.1 - - [11/Jun/2020 09:26:29] "GET /a HTTP/1.1" 404 -
WSO2日志:
[2020-06-13 08:24:33,567] WARN {org.apache.synapse.endpoints.EndpointContext} - Endpoint : AnonymousEndpoint with address http://localhost:8000 will be marked SUSPENDED as it failed
[2020-06-13 08:24:33,567] WARN {org.apache.synapse.endpoints.EndpointContext} - Suspending endpoint : AnonymousEndpoint with address http://localhost:8000 - current suspend duration is : 1000ms - Next retry after : Sat Jun 13 08:24:34 CEST 2020
我在文件passthru-http.properties
中具有http.socket.timeout = 180000
的设置。我总是尝试在那放3000,但还是会覆盖它:(
如何使其运作?
您能否像下面那样使用地址端点代替http。