Class FailoverLoadBalancerDefinition
- java.lang.Object
-
- org.apache.camel.model.IdentifiedType
-
- org.apache.camel.model.LoadBalancerDefinition
-
- org.apache.camel.model.loadbalancer.FailoverLoadBalancerDefinition
-
@Metadata(label="eip,routing") public class FailoverLoadBalancerDefinition extends LoadBalancerDefinition
In case of failures the exchange will be tried on the next endpoint.
-
-
Constructor Summary
Constructors Constructor Description FailoverLoadBalancerDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getExceptions()
List<Class<?>>
getExceptionTypes()
String
getMaximumFailoverAttempts()
String
getRoundRobin()
String
getSticky()
void
setExceptions(List<String> exceptions)
A list of class names for specific exceptions to monitor.void
setExceptionTypes(List<Class<?>> exceptionTypes)
A list of specific exceptions to monitor.void
setMaximumFailoverAttempts(String maximumFailoverAttempts)
A value to indicate after X failover attempts we should exhaust (give up).void
setRoundRobin(String roundRobin)
Whether or not the failover load balancer should operate in round robin mode or not.void
setSticky(String sticky)
Whether or not the failover load balancer should operate in sticky mode or not.String
toString()
-
Methods inherited from class org.apache.camel.model.LoadBalancerDefinition
getLoadBalancerTypeName, getMaximumNumberOfOutputs
-
Methods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
-
-
-
Method Detail
-
setExceptions
public void setExceptions(List<String> exceptions)
A list of class names for specific exceptions to monitor. If no exceptions are configured then all exceptions are monitored
-
setExceptionTypes
public void setExceptionTypes(List<Class<?>> exceptionTypes)
A list of specific exceptions to monitor. If no exceptions are configured then all exceptions are monitored
-
getRoundRobin
public String getRoundRobin()
-
setRoundRobin
public void setRoundRobin(String roundRobin)
Whether or not the failover load balancer should operate in round robin mode or not. If not, then it will always start from the first endpoint when a new message is to be processed. In other words it restart from the top for every message. If round robin is enabled, then it keeps state and will continue with the next endpoint in a round robin fashion. You can also enable sticky mode together with round robin, if so then it will pick the last known good endpoint to use when starting the load balancing (instead of using the next when starting).
-
getSticky
public String getSticky()
-
setSticky
public void setSticky(String sticky)
Whether or not the failover load balancer should operate in sticky mode or not. If not, then it will always start from the first endpoint when a new message is to be processed. In other words it restart from the top for every message. If sticky is enabled, then it keeps state and will continue with the last known good endpoint. You can also enable sticky mode together with round robin, if so then it will pick the last known good endpoint to use when starting the load balancing (instead of using the next when starting).
-
getMaximumFailoverAttempts
public String getMaximumFailoverAttempts()
-
setMaximumFailoverAttempts
public void setMaximumFailoverAttempts(String maximumFailoverAttempts)
A value to indicate after X failover attempts we should exhaust (give up). Use -1 to indicate never give up and continuously try to failover. Use 0 to never failover. And use e.g. 3 to failover at most 3 times before giving up. his option can be used whether or not roundRobin is enabled or not.
-
toString
public String toString()
- Overrides:
toString
in classLoadBalancerDefinition
-
-