如何使用clone mediator处理超时?

时间:2012-08-14 02:14:55

标签: wso2 clone aggregate wso2esb

我有这样的问题。我使用clone将请求发送到不同的端点。但是如果一个endpont超时。响应消息无法聚合。有人可以帮帮我吗?非常感谢你? 错误讯息:

[2012-08-14 09:44:08,077]  WARN - EndpointContext Endpoint : Endpoint_AAA_101000
 will be marked SUSPENDED as it failed
[2012-08-14 09:44:08,077]  WARN - EndpointContext Suspending endpoint : Endpoint
_AAA_101000 - current suspend duration is : 30000ms - Next retry after : Tue Aug
 14 09:44:38 CST 2012
[2012-08-14 09:45:07,593]  INFO - HTTPSender Unable to sendViaPost to url[http:/
/localhost:8280/services/CMSLevelService.CMSLevelServiceHttpSoap12Endpoint]
java.net.SocketTimeoutException: Read timed out

服务配置:

<proxy xmlns="http://ws.apache.org/ns/synapse" name="CMSLevelService" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
   <target>
      <inSequence>
            <clone sequential="false">
              <target endpoint="Endpoint_AAA_100000" />
              <target endpoint="Endpoint_AAA_101000" />
              <target endpoint="Endpoint_Portal_100000" />
              <target endpoint="Endpoint_Portal_101000" />
              <target endpoint="Endpoint_PortalMS" />
              <target endpoint="Endpoint_SME" />
              <target endpoint="Endpoint_USM" />
            </clone>
      </inSequence>
      <outSequence>
         <log level="full" />
         <aggregate>
            <completeCondition>
               <messageCount min="10" max="10" />
            </completeCondition>
            <onComplete xmlns:s12="http://www.w3.org/2003/05/soap-envelope" xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/" expression="//message">
                <log level="full" />
                <send />
            </onComplete>
         </aggregate>
      </outSequence>
   </target>
</proxy>

1 个答案:

答案 0 :(得分:0)

您可以为聚合设置Completion Timeout。然后它将丢弃超时响应。最好的问候。