簡體   English   中英

使用CAMEL故障轉移EiP(負載均衡器)后如何獲得HTTP重發?

[英]How can i get the HTTP respense after using a CAMEL Failover EiP (Load Balancer)?

這條路線:

<route> 
<from uri="direct:xyz"/> 
<loadBalance> 
    <failover maximumFailoverAttempts="2" roundRobin="false"> 
    <exception>java.net.NoRouteToHostException</exception> </failover> 
    <to uri="http://URi1"/>
    <to uri="http://URi2 "/>
</loadBalance>

當無法與URi 1建立連接時,我使用URi2。 如何顯示回復?

如果您不想破壞當前模式,建議您使用直接端點上的故障轉移。 免責聲明:我通常在DSL中工作,因此語法可能會略有偏離。

<from uri="direct:xyz">
    <loadBalance> 
        <failover maximumFailoverAttempts="2" roundRobin="false"> 
        <exception>java.net.NoRouteToHostException</exception> </failover> 
       <to uri="direct:primary"/>
       <to uri="direct:secondary"/>
    </loadBalance>
</from>

<from uri="direct:primary">
    <errorHandler id="noErrorHandler" type="NoErrorHandler"/>
    <to uri="http://URi1"/>
    //Response handling
</from>

<from uri="direct:secondary">
    <errorHandler id="noErrorHandler" type="NoErrorHandler"/>
    <to uri="http://URi2"/>
    //Response handling
</from>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM