[英]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.