This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new e31d385 Added weighted load balance EIP docs
e31d385 is described below
commit e31d38511f88d265c3751820d04970ea3642751c
Author: Andrea Cosentino <[email protected]>
AuthorDate: Tue Feb 20 14:37:24 2018 +0100
Added weighted load balance EIP docs
---
camel-core/src/main/docs/eips/failover-eip.adoc | 2 +-
camel-core/src/main/docs/eips/roundRobin-eip.adoc | 2 +-
camel-core/src/main/docs/eips/sticky-eip.adoc | 2 +-
camel-core/src/main/docs/eips/topic-eip.adoc | 2 +-
camel-core/src/main/docs/eips/weighted-eip.adoc | 44 +++++++++++++++++++++++
5 files changed, 48 insertions(+), 4 deletions(-)
diff --git a/camel-core/src/main/docs/eips/failover-eip.adoc
b/camel-core/src/main/docs/eips/failover-eip.adoc
index 6c41b56..ad4235b 100644
--- a/camel-core/src/main/docs/eips/failover-eip.adoc
+++ b/camel-core/src/main/docs/eips/failover-eip.adoc
@@ -43,5 +43,5 @@ In XML you'll have a route like this
<to uri="seda:x"/>
<to uri="seda:y"/>
<to uri="seda:z"/>
-</loadBalance>
+ </loadBalance>
----
diff --git a/camel-core/src/main/docs/eips/roundRobin-eip.adoc
b/camel-core/src/main/docs/eips/roundRobin-eip.adoc
index cefdeb4..ed157c0 100644
--- a/camel-core/src/main/docs/eips/roundRobin-eip.adoc
+++ b/camel-core/src/main/docs/eips/roundRobin-eip.adoc
@@ -31,5 +31,5 @@ In XML you'll have a route like this
<to uri="seda:x"/>
<to uri="seda:y"/>
<to uri="seda:z"/>
-</loadBalance>
+ </loadBalance>
----
diff --git a/camel-core/src/main/docs/eips/sticky-eip.adoc
b/camel-core/src/main/docs/eips/sticky-eip.adoc
index b0c04f6..f0ead32 100644
--- a/camel-core/src/main/docs/eips/sticky-eip.adoc
+++ b/camel-core/src/main/docs/eips/sticky-eip.adoc
@@ -42,5 +42,5 @@ In XML you'll have a route like this
<to uri="seda:x"/>
<to uri="seda:y"/>
<to uri="seda:z"/>
-</loadBalance>
+ </loadBalance>
----
diff --git a/camel-core/src/main/docs/eips/topic-eip.adoc
b/camel-core/src/main/docs/eips/topic-eip.adoc
index fe269b7..e858c33 100644
--- a/camel-core/src/main/docs/eips/topic-eip.adoc
+++ b/camel-core/src/main/docs/eips/topic-eip.adoc
@@ -31,5 +31,5 @@ In XML you'll have a route like this
<to uri="seda:x"/>
<to uri="seda:y"/>
<to uri="seda:z"/>
-</loadBalance>
+ </loadBalance>
----
diff --git a/camel-core/src/main/docs/eips/weighted-eip.adoc
b/camel-core/src/main/docs/eips/weighted-eip.adoc
new file mode 100644
index 0000000..83c7bcd
--- /dev/null
+++ b/camel-core/src/main/docs/eips/weighted-eip.adoc
@@ -0,0 +1,44 @@
+[[weighted-eip]]
+== Weighted EIP
+
+Weighted Load Balancer, with this policy in case of failures the exchange will
be tried on the next endpoint.
+
+=== Options
+
+// eip options: START
+The Weighted EIP supports 3 options which are listed below:
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *roundRobin* | To enable round robin mode. By default the weighted
distribution mode is used. The default value is false. | false | Boolean
+| *distributionRatio* | *Required* The distribution ratio is a delimited
String consisting on integer weights separated by delimiters for example 2,3,5.
The distributionRatio must match the number of endpoints and/or processors
specified in the load balancer list. | | String
+| *distributionRatioDelimiter* | Delimiter used to specify the distribution
ratio. The default value is , | , | String
+|===
+// eip options: END
+
+=== Examples
+
+In this case we are using the header test as correlation expression:
+
+[source,java]
+----
+from("direct:start")
+ .loadBalance()
+ .weighted(false, "4,2,1")
+ .to("seda:x", "seda:y", "seda:z");
+----
+
+In XML you'll have a route like this
+
+[source,xml]
+----
+<from uri="direct:start"/>
+ <loadBalance>
+ <weighted roundRobin="false" distributionRatio="4 2 1"/>
+ <to uri="seda:x"/>
+ <to uri="seda:y"/>
+ <to uri="seda:z"/>
+ </loadBalance>
+----
--
To stop receiving notification emails like this one, please contact
[email protected].