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
commit 9a8a3a75e44b35bceae3ec1d26d500661a8d43fc Author: Andrea Cosentino <[email protected]> AuthorDate: Tue Feb 20 13:10:35 2018 +0100 Add examples to sticky-eip docs --- camel-core/src/main/docs/eips/sticky-eip.adoc | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/camel-core/src/main/docs/eips/sticky-eip.adoc b/camel-core/src/main/docs/eips/sticky-eip.adoc index 8eb778c..a2c9ec7 100644 --- a/camel-core/src/main/docs/eips/sticky-eip.adoc +++ b/camel-core/src/main/docs/eips/sticky-eip.adoc @@ -14,3 +14,32 @@ The Sticky EIP supports 1 options which are listed below: | *correlationExpression* | *Required* The correlation expression to use to calculate the correlation key | | NamespaceAware Expression |=== // eip options: END + +=== Examples + +In this case we are using the header test as correlation expression: + +[source,java] +---- +from("direct:start") + .loadBalance() + .sticky(header("test")) + .to("seda:x", "seda:y", "seda:z"); +---- + +In XML you'll have a route like this + +[source,xml] +---- +<from uri="direct:start"/> + <loadBalance> + <sticky> + <correlationExpression> + <header>test</header> + </correlationExpression> + </sticky> + <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].
