Mule Https请求响应超时
我正在尝试为https请求组件配置响应超时。 我的http连接器正在调用URL,我想设置一个时间,例如,如果URL没有响应,请在5秒后关闭此https连接。 但我在谷歌和mule网站上搜索过,没有相关信息。 我调用的这个Web服务重置密码,如果在特定时间后我没有收到响应,我想关闭它,不想重置它 以下是示例代码:Mule Https请求响应超时,https,mule,mule-studio,mule-component,Https,Mule,Mule Studio,Mule Component,我正在尝试为https请求组件配置响应超时。 我的http连接器正在调用URL,我想设置一个时间,例如,如果URL没有响应,请在5秒后关闭此https连接。 但我在谷歌和mule网站上搜索过,没有相关信息。 我调用的这个Web服务重置密码,如果在特定时间后我没有收到响应,我想关闭它,不想重置它 以下是示例代码: <http:request-config name="HTTP_Request_Configuration" protocol="HTTPS" host="10.255.255.1
<http:request-config name="HTTP_Request_Configuration" protocol="HTTPS" host="10.255.255.1." port="2446" doc:name="HTTP Request Configuration" responseTimeout="1" usePersistentConnections="false">
responseTimeout没有做任何事情,我已经尝试使用SOAPUI来测试时间,无论我放什么,时间都是一样的。
提前感谢我已经在Http-request配置中设置了responseTimeout属性,它对我有效 请在下面查找代码 希望这有帮助
<!--Http Listener Config for calling Service-->
<http:listener-config name="HTTP_Listener_Configuration1" host="0.0.0.0" port="8092" doc:name="HTTP Listener Configuration"/>
<http:request-config name="HTTP_Request_Configuration" host="localhost" port="8092" doc:name="HTTP Request Configuration" responseTimeout="5000"/>
<flow name="testtimeoutFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
<http:request config-ref="HTTP_Request_Configuration" path="/test" method="GET" doc:name="HTTP"/>
<catch-exception-strategy doc:name="Catch Exception Strategy">
<logger message="#[message.exception]" level="INFO" doc:name="Logger"/>
<set-payload value="#['Time out Error']" doc:name="Set Payload"/>
</catch-exception-strategy>
</flow>
<!-- Flow which has delay in responding the data-->
<flow name="testtimeoutFlow1">
<http:listener config-ref="HTTP_Listener_Configuration1" path="/test" doc:name="HTTP" allowedMethods="GET"/>
<set-payload value="#['HelloWorld']" doc:name="Set Payload"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
<!-- Delay for 10 seconds-->
<scripting:component doc:name="Groovy">
<scripting:script engine="Groovy"><![CDATA[sleep(10000);
return message.payload;]]>
</scripting:script>
</scripting:component>
<logger message="After Script : #[payload]" level="INFO" doc:name="Logger"/>
</flow>