You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2018/12/10 12:42:41 UTC

[camel] branch sandbox/camel-3.x updated (6752e17 -> 876022a)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch sandbox/camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 6752e17  CAMEL-12985 - Fixed backport from 2.x
     new 0b13d05  CAMEL-11888 - camel-jgroups-raft initial commit.
     new 85d434d  CAMEL-11888 - Fixed backport from 2.x and regen
     new 876022a  CAMEL-11888 - Regen

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 apache-camel/pom.xml                               |   9 +
 apache-camel/src/main/descriptors/common-bin.xml   |   2 +
 bom/camel-bom/pom.xml                              |  10 +
 camel-core/readme.adoc                             |   2 +-
 components/camel-jgroups-raft/pom.xml              | 101 ++++++++++
 .../src/main/docs/jgroups-raft-component.adoc      | 197 +++++++++++++++++++
 .../jgroups/raft/CamelRoleChangeListener.java      |  79 ++++++++
 .../jgroups/raft/JGroupsRaftComponent.java         | 103 ++++++++++
 .../jgroups/raft/JGroupsRaftConstants.java         |  38 ++++
 .../jgroups/raft/JGroupsRaftConsumer.java          |  69 +++++++
 .../jgroups/raft/JGroupsRaftEndpoint.java          | 217 +++++++++++++++++++++
 .../jgroups/raft/JGroupsRaftEventType.java         |  26 +++
 .../jgroups/raft/JGroupsRaftException.java         |  30 +++
 .../jgroups/raft/JGroupsRaftProducer.java          |  87 +++++++++
 .../raft/cluster/ClusterRoleChangeListener.java    |  67 +++++++
 .../raft/cluster/JGroupsRaftClusterService.java    |  80 ++++++++
 .../raft/cluster/JGroupsRaftClusterView.java       | 149 ++++++++++++++
 .../jgroups/raft/utils/NopStateMachine.java        |  47 +++++
 .../src/main/resources}/LICENSE.txt                |   0
 .../org/apache/camel/component/jgroups-raft        |  18 ++
 .../src/main/resources}/NOTICE.txt                 |   0
 .../camel-jgroups-raft/src/main/resources/raft.xml |  40 ++++
 .../jgroups/raft/JGroupsRaftAbstractTest.java      |  49 +++++
 .../raft/JGroupsRaftComponentConfiguredTest.java   |  74 +++++++
 .../raft/JGroupsRaftComponentDefaultTest.java      |  59 ++++++
 .../jgroups/raft/JGroupsRaftConsumerTest.java      |  90 +++++++++
 .../jgroups/raft/JGroupsRaftEndpointTest.java      |  94 +++++++++
 .../jgroups/raft/JGroupsRaftProducerTest.java      |  66 +++++++
 .../cluster/JGroupsRaftClusterAbastractTest.java   |  35 ++++
 .../JGroupsRaftClusteredRoutePolicyTest.java       | 118 +++++++++++
 .../raft/cluster/JGroupsRaftMasterTest.java        | 127 ++++++++++++
 .../src/test/resources/log4j2.properties           |  36 ++++
 .../camel-jgroups-raft/src/test/resources/raft.xml |  49 +++++
 .../src/test/resources/raftABC.xml                 |  49 +++++
 .../src/test/resources/raftB.xml                   |  49 +++++
 .../src/test/resources/raftC.xml                   |  49 +++++
 components/pom.xml                                 |   1 +
 components/readme.adoc                             |  92 ++++++++-
 docs/user-manual/en/SUMMARY.md                     |  35 ++++
 parent/pom.xml                                     |  14 ++
 .../karaf/features/src/main/resources/features.xml |  11 ++
 .../camel-jgroups-raft-starter/pom.xml             |  53 +++++
 .../JGroupsRaftComponentAutoConfiguration.java     | 129 ++++++++++++
 .../JGroupsRaftComponentConfiguration.java         | 105 ++++++++++
 ...JGroupsRaftClusterServiceAutoConfiguration.java |  53 +++++
 .../JGroupsRaftClusterServiceConfiguration.java    |  89 +++++++++
 .../src/main/resources/META-INF/LICENSE.txt        |   0
 .../src/main/resources/META-INF/NOTICE.txt         |   0
 .../additional-spring-configuration-metadata.json  |  10 +
 .../src/main/resources/META-INF/spring.factories   |  21 ++
 .../src/main/resources/META-INF/spring.provides    |  17 ++
 platforms/spring-boot/components-starter/pom.xml   |   1 +
 .../camel-spring-boot-dependencies/pom.xml         |  14 +-
 .../camel/itest/karaf/CamelJgroupsRaftTest.java    |  34 ++++
 .../itest/springboot/CamelJgroupsRaftTest.java     |  48 +++++
 55 files changed, 3035 insertions(+), 7 deletions(-)
 create mode 100644 components/camel-jgroups-raft/pom.xml
 create mode 100644 components/camel-jgroups-raft/src/main/docs/jgroups-raft-component.adoc
 create mode 100644 components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/CamelRoleChangeListener.java
 create mode 100644 components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponent.java
 create mode 100644 components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConstants.java
 create mode 100644 components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConsumer.java
 create mode 100644 components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEndpoint.java
 create mode 100644 components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEventType.java
 create mode 100644 components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftException.java
 create mode 100644 components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftProducer.java
 create mode 100644 components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/ClusterRoleChangeListener.java
 create mode 100644 components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterService.java
 create mode 100644 components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterView.java
 create mode 100644 components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/utils/NopStateMachine.java
 copy {tooling/maven/camel-package-maven-plugin/src/main/resources/META-INF => components/camel-jgroups-raft/src/main/resources}/LICENSE.txt (100%)
 create mode 100644 components/camel-jgroups-raft/src/main/resources/META-INF/services/org/apache/camel/component/jgroups-raft
 copy {tooling/maven/camel-package-maven-plugin/src/main/resources/META-INF => components/camel-jgroups-raft/src/main/resources}/NOTICE.txt (100%)
 create mode 100644 components/camel-jgroups-raft/src/main/resources/raft.xml
 create mode 100644 components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftAbstractTest.java
 create mode 100644 components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponentConfiguredTest.java
 create mode 100644 components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponentDefaultTest.java
 create mode 100644 components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConsumerTest.java
 create mode 100644 components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEndpointTest.java
 create mode 100644 components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftProducerTest.java
 create mode 100644 components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterAbastractTest.java
 create mode 100644 components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusteredRoutePolicyTest.java
 create mode 100644 components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftMasterTest.java
 create mode 100644 components/camel-jgroups-raft/src/test/resources/log4j2.properties
 create mode 100644 components/camel-jgroups-raft/src/test/resources/raft.xml
 create mode 100644 components/camel-jgroups-raft/src/test/resources/raftABC.xml
 create mode 100644 components/camel-jgroups-raft/src/test/resources/raftB.xml
 create mode 100644 components/camel-jgroups-raft/src/test/resources/raftC.xml
 create mode 100644 platforms/spring-boot/components-starter/camel-jgroups-raft-starter/pom.xml
 create mode 100644 platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/JGroupsRaftComponentAutoConfiguration.java
 create mode 100644 platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/JGroupsRaftComponentConfiguration.java
 create mode 100644 platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/cluster/springboot/JGroupsRaftClusterServiceAutoConfiguration.java
 create mode 100644 platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/cluster/springboot/JGroupsRaftClusterServiceConfiguration.java
 copy {tooling/maven/camel-package-maven-plugin => platforms/spring-boot/components-starter/camel-jgroups-raft-starter}/src/main/resources/META-INF/LICENSE.txt (100%)
 copy {tooling/maven/camel-package-maven-plugin => platforms/spring-boot/components-starter/camel-jgroups-raft-starter}/src/main/resources/META-INF/NOTICE.txt (100%)
 create mode 100644 platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
 create mode 100644 platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/spring.factories
 create mode 100644 platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/spring.provides
 create mode 100644 tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelJgroupsRaftTest.java
 create mode 100644 tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelJgroupsRaftTest.java


[camel] 03/03: CAMEL-11888 - Regen

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch sandbox/camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 876022ada59b7048c452bfe8adfd7c17d6030a81
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Dec 10 13:40:07 2018 +0100

    CAMEL-11888 - Regen
---
 camel-core/readme.adoc                             |  2 +-
 components/readme.adoc                             | 92 +++++++++++++++++++---
 docs/user-manual/en/SUMMARY.md                     | 33 +++++++-
 .../camel-jgroups-raft-starter/pom.xml             |  2 +-
 ...JGroupsRaftClusterServiceAutoConfiguration.java |  2 +-
 .../camel-spring-boot-dependencies/pom.xml         | 14 +++-
 6 files changed, 126 insertions(+), 19 deletions(-)

diff --git a/camel-core/readme.adoc b/camel-core/readme.adoc
index 409ba95..300a76c 100644
--- a/camel-core/readme.adoc
+++ b/camel-core/readme.adoc
@@ -103,7 +103,7 @@ Data Formats
 
 
 // dataformats: START
-Number of Data Formats: 4 in 35 JAR artifacts (0 deprecated)
+Number of Data Formats: 4 in 40 JAR artifacts (4 deprecated)
 
 [width="100%",cols="4,1,5",options="header"]
 |===
diff --git a/components/readme.adoc b/components/readme.adoc
index efbb3b5..f85915b 100644
--- a/components/readme.adoc
+++ b/components/readme.adoc
@@ -2,7 +2,7 @@ Components
 ^^^^^^^^^^
 
 // components: START
-Number of Components: 287 in 190 JAR artifacts (1 deprecated)
+Number of Components: 301 in 204 JAR artifacts (14 deprecated)
 
 [width="100%",cols="4,1,5",options="header"]
 |===
@@ -143,6 +143,9 @@ Number of Components: 287 in 190 JAR artifacts (1 deprecated)
 | link:camel-caffeine/src/main/docs/caffeine-loadcache-component.adoc[Caffeine LoadCache] (camel-caffeine) +
 `caffeine-loadcache:cacheName` | 2.20 | The caffeine-loadcache component is used for integration with Caffeine Load Cache.
 
+| link:camel-context/src/main/docs/context-component.adoc[Camel Context] (camel-context) +
+`context:contextId:localEndpointUrl` | 2.7 | *deprecated* The context component allows to send/receive messages between Camel routes in a black box way.
+
 | link:camel-cassandraql/src/main/docs/cql-component.adoc[Cassandra CQL] (camel-cassandraql) +
 `cql:beanRef:hosts:port/keyspace` | 2.15 | The cql component aims at integrating Cassandra 2.0 using the CQL3 API (not the Thrift API).
 
@@ -227,6 +230,9 @@ Number of Components: 287 in 190 JAR artifacts (1 deprecated)
 | link:camel-dropbox/src/main/docs/dropbox-component.adoc[Dropbox] (camel-dropbox) +
 `dropbox:operation` | 2.14 | For uploading, downloading and managing files, folders, groups, collaborations, etc on dropbox DOT com.
 
+| link:camel-cache/src/main/docs/cache-component.adoc[EHCache] (camel-cache) +
+`cache:cacheName` | 2.1 | *deprecated* The cache component enables you to perform caching operations using EHCache as the Cache Implementation.
+
 | link:camel-ehcache/src/main/docs/ehcache-component.adoc[Ehcache] (camel-ehcache) +
 `ehcache:cacheName` | 2.18 | The ehcache component enables you to perform caching operations using Ehcache as cache implementation.
 
@@ -236,9 +242,6 @@ Number of Components: 287 in 190 JAR artifacts (1 deprecated)
 | link:camel-elasticsearch-rest/src/main/docs/elasticsearch-rest-component.adoc[Elastichsearch Rest] (camel-elasticsearch-rest) +
 `elasticsearch-rest:clusterName` | 2.21 | The elasticsearch component is used for interfacing with ElasticSearch server using REST API.
 
-| link:camel-elasticsearch5-rest/src/main/docs/elasticsearch5-rest-component.adoc[Elastichsearch5 Rest] (camel-elasticsearch5-rest) +
-`elasticsearch5-rest:clusterName` | 2.21 | The elasticsearch component is used for interfacing with ElasticSearch server using 5.x REST API.
-
 | link:camel-elasticsearch/src/main/docs/elasticsearch-component.adoc[Elasticsearch] (camel-elasticsearch) +
 `elasticsearch:clusterName` | 2.11 | *deprecated* The elasticsearch component is used for interfacing with ElasticSearch server.
 
@@ -377,6 +380,9 @@ Number of Components: 287 in 190 JAR artifacts (1 deprecated)
 | link:camel-http4/src/main/docs/http4-component.adoc[HTTP4] (camel-http4) +
 `http4:httpUri` | 2.3 | For calling out to external HTTP servers using Apache HTTP Client 4.x.
 
+| link:camel-ibatis/src/main/docs/ibatis-component.adoc[iBatis] (camel-ibatis) +
+`ibatis:statement` | 1.2 | *deprecated* Performs a query, poll, insert, update or delete in a relational database using Apache iBATIS.
+
 | link:camel-iec60870/src/main/docs/iec60870-client-component.adoc[IEC 60870 Client] (camel-iec60870) +
 `iec60870-client:uriPath` | 2.20 | IEC 60870 component used for telecontrol (supervisory control and data acquisition) such as controlling electric power transmission grids and other geographically widespread control systems.
 
@@ -419,6 +425,9 @@ Number of Components: 287 in 190 JAR artifacts (1 deprecated)
 | link:camel-ironmq/src/main/docs/ironmq-component.adoc[IronMQ] (camel-ironmq) +
 `ironmq:queueName` | 2.17 | The ironmq provides integration with IronMQ an elastic and durable hosted message queue as a service.
 
+| link:camel-javaspace/src/main/docs/javaspace-component.adoc[JavaSpace] (camel-javaspace) +
+`javaspace:url` | 2.1 | *deprecated* Sending and receiving messages through JavaSpace.
+
 | link:camel-jbpm/src/main/docs/jbpm-component.adoc[JBPM] (camel-jbpm) +
 `jbpm:connectionURL` | 2.6 | The jbpm component provides integration with jBPM (Business Process Management).
 
@@ -449,6 +458,9 @@ Number of Components: 287 in 190 JAR artifacts (1 deprecated)
 | link:camel-jing/src/main/docs/jing-component.adoc[Jing] (camel-jing) +
 `jing:resourceUri` | 1.1 | Validates the payload of a message using RelaxNG Syntax using Jing library.
 
+| link:camel-jira/src/main/docs/jira-component.adoc[JIRA] (camel-jira) +
+`jira:type` | 2.15 | *deprecated* The jira component interacts with the JIRA issue tracker.
+
 | link:camel-jms/src/main/docs/jms-component.adoc[JMS] (camel-jms) +
 `jms:destinationType:destinationName` | 1.0 | The jms component allows messages to be sent to (or consumed from) a JMS Queue or Topic.
 
@@ -470,6 +482,12 @@ Number of Components: 287 in 190 JAR artifacts (1 deprecated)
 | link:camel-kafka/src/main/docs/kafka-component.adoc[Kafka] (camel-kafka) +
 `kafka:topic` | 2.13 | The kafka component allows messages to be sent to (or consumed from) Apache Kafka brokers.
 
+| link:camel-kestrel/src/main/docs/kestrel-component.adoc[Kestrel] (camel-kestrel) +
+`kestrel:addresses/queue` | 2.6 | *deprecated* The kestrel component allows messages to be sent to (or consumed from) Kestrel brokers.
+
+| link:camel-krati/src/main/docs/krati-component.adoc[Krati] (camel-krati) +
+`krati:path` | 2.9 | *deprecated* The krati allows the use krati datastores and datasets inside Camel.
+
 | link:camel-kubernetes/src/main/docs/kubernetes-config-maps-component.adoc[Kubernetes ConfigMap] (camel-kubernetes) +
 `kubernetes-config-maps:masterUrl` | 2.17 | The Kubernetes Configmaps component provides a producer to execute kubernetes configmap operations.
 
@@ -554,6 +572,9 @@ Number of Components: 287 in 190 JAR artifacts (1 deprecated)
 | link:../camel-core/src/main/docs/mock-component.adoc[Mock] (camel-core) +
 `mock:name` | 1.0 | The mock component is used for testing routes and mediation rules using mocks.
 
+| link:camel-mongodb/src/main/docs/mongodb-component.adoc[MongoDB] (camel-mongodb) +
+`mongodb:connectionBean` | 2.10 | *deprecated* Component for working with documents stored in MongoDB database.
+
 | link:camel-mongodb3/src/main/docs/mongodb3-component.adoc[MongoDB] (camel-mongodb3) +
 `mongodb3:connectionBean` | 2.19 | Component for working with documents stored in MongoDB database.
 
@@ -659,6 +680,9 @@ Number of Components: 287 in 190 JAR artifacts (1 deprecated)
 | link:camel-pubnub/src/main/docs/pubnub-component.adoc[PubNub] (camel-pubnub) +
 `pubnub:channel` | 2.19 | To send and receive messages to PubNub data stream network for connected devices.
 
+| link:camel-quartz/src/main/docs/quartz-component.adoc[Quartz] (camel-quartz) +
+`quartz:groupName/timerName` | 1.0 | *deprecated* Provides a scheduled delivery of messages using the Quartz 1.x scheduler.
+
 | link:camel-quartz2/src/main/docs/quartz2-component.adoc[Quartz2] (camel-quartz2) +
 `quartz2:groupName/triggerName` | 2.12 | Provides a scheduled delivery of messages using the Quartz 2.x scheduler.
 
@@ -689,6 +713,9 @@ Number of Components: 287 in 190 JAR artifacts (1 deprecated)
 | link:camel-rmi/src/main/docs/rmi-component.adoc[RMI] (camel-rmi) +
 `rmi:hostname:port/name` | 1.0 | The rmi component is for invoking Java RMI beans from Camel.
 
+| link:camel-routebox/src/main/docs/routebox-component.adoc[RouteBox] (camel-routebox) +
+`routebox:routeboxName` | 2.6 | *deprecated* The routebox component allows to send/receive messages between Camel routes in a black box way.
+
 | link:camel-rss/src/main/docs/rss-component.adoc[RSS] (camel-rss) +
 `rss:feedUri` | 2.0 | The rss component is used for consuming RSS feeds.
 
@@ -854,6 +881,9 @@ Number of Components: 287 in 190 JAR artifacts (1 deprecated)
 | link:camel-xchange/src/main/docs/xchange-component.adoc[XChange] (camel-xchange) +
 `xchange:name` | 2.21 | The camel-xchange component provide access to many bitcoin and altcoin exchanges for trading and accessing market data.
 
+| link:camel-xmlrpc/src/main/docs/xmlrpc-component.adoc[XML RPC] (camel-xmlrpc) +
+`xmlrpc:address` | 2.11 | *deprecated* The xmlrpc component is used for sending messages to a XML RPC service.
+
 | link:camel-xmlsecurity/src/main/docs/xmlsecurity-component.adoc[XML Security] (camel-xmlsecurity) +
 `xmlsecurity:command:name` | 2.12 | Used to sign and verify exchanges using the XML signature specification.
 
@@ -889,7 +919,7 @@ Data Formats
 ^^^^^^^^^^^^
 
 // dataformats: START
-Number of Data Formats: 45 in 35 JAR artifacts (0 deprecated)
+Number of Data Formats: 50 in 40 JAR artifacts (4 deprecated)
 
 [width="100%",cols="4,1,5",options="header"]
 |===
@@ -913,6 +943,8 @@ Number of Data Formats: 45 in 35 JAR artifacts (0 deprecated)
 
 | link:camel-boon/src/main/docs/boon-dataformat.adoc[Boon] (camel-boon) | 2.16 | Boon data format is used for unmarshal a JSon payload to POJO or to marshal POJO back to JSon payload.
 
+| link:camel-castor/src/main/docs/castor-dataformat.adoc[Castor] (camel-castor) | 2.1 | *deprecated* Castor data format is used for unmarshal a XML payload to POJO or to marshal POJO back to XML payload.
+
 | link:camel-crypto/src/main/docs/crypto-dataformat.adoc[Crypto (Java Cryptographic Extension)] (camel-crypto) | 2.3 | Crypto data format is used for encrypting and decrypting of messages using Java Cryptographic Extension.
 
 | link:camel-csv/src/main/docs/csv-dataformat.adoc[CSV] (camel-csv) | 1.3 | The CSV data format is used for handling CSV payloads.
@@ -925,6 +957,8 @@ Number of Data Formats: 45 in 35 JAR artifacts (0 deprecated)
 
 | link:../camel-core/src/main/docs/gzip-dataformat.adoc[GZip] (camel-core) | 2.0 | The GZip data format is a message compression and de-compression format (which works with the popular gzip/gunzip tools).
 
+| link:camel-hessian/src/main/docs/hessian-dataformat.adoc[Hessian] (camel-hessian) | 2.17 | *deprecated* Hessian data format is used for marshalling and unmarshalling messages using Cauchos Hessian format.
+
 | link:camel-hl7/src/main/docs/hl7-dataformat.adoc[HL7] (camel-hl7) | 2.0 | The HL7 data format can be used to marshal or unmarshal HL7 (Health Care) model objects.
 
 | link:camel-ical/src/main/docs/ical-dataformat.adoc[iCal] (camel-ical) | 2.12 | The iCal dataformat is used for working with iCalendar messages.
@@ -975,6 +1009,12 @@ Number of Data Formats: 45 in 35 JAR artifacts (0 deprecated)
 
 | link:camel-univocity-parsers/src/main/docs/univocity-tsv-dataformat.adoc[uniVocity TSV] (camel-univocity-parsers) | 2.15 | The uniVocity TSV data format is used for working with TSV (Tabular Separated Values) flat payloads.
 
+| link:camel-xmlbeans/src/main/docs/xmlBeans-dataformat.adoc[XML Beans] (camel-xmlbeans) | 1.2 | *deprecated* XML Beans data format is used for unmarshal a XML payload to POJO or to marshal POJO back to XML payload.
+
+| link:camel-xmljson/src/main/docs/xmljson-dataformat.adoc[XML JSon] (camel-xmljson) | 2.10 | *deprecated* XML JSon data format can convert from XML to JSON and vice-versa directly, without stepping through intermediate POJOs.
+
+| link:camel-xmlrpc/src/main/docs/xmlrpc-dataformat.adoc[XML RPC] (camel-xmlrpc) | 2.11 | The XML RPC data format is used for working with the XML RPC protocol.
+
 | link:camel-xmlsecurity/src/main/docs/secureXML-dataformat.adoc[XML Security] (camel-xmlsecurity) | 2.0 | The XML Security data format facilitates encryption and decryption of XML payloads.
 
 | link:camel-xstream/src/main/docs/xstream-dataformat.adoc[XStream] (camel-xstream) | 1.3 | XSTream data format is used for unmarshal a XML payload to POJO or to marshal POJO back to XML payload.
@@ -992,7 +1032,7 @@ Expression Languages
 ^^^^^^^^^^^^^^^^^^^^
 
 // languages: START
-Number of Languages: 18 in 9 JAR artifacts (0 deprecated)
+Number of Languages: 21 in 12 JAR artifacts (3 deprecated)
 
 [width="100%",cols="4,1,5",options="header"]
 |===
@@ -1002,6 +1042,8 @@ Number of Languages: 18 in 9 JAR artifacts (0 deprecated)
 
 | link:../camel-core/src/main/docs/constant-language.adoc[Constant] (camel-core) | 1.5 | To use a constant value in Camel expressions or predicates.
 
+| link:camel-juel/src/main/docs/el-language.adoc[EL] (camel-juel) | 1.1 | *deprecated* To use EL scripts in Camel expressions or predicates.
+
 | link:../camel-core/src/main/docs/exchangeProperty-language.adoc[ExchangeProperty] (camel-core) | 2.0 | To use a Camel Exchange property in expressions or predicates.
 
 | link:../camel-core/src/main/docs/file-language.adoc[File] (camel-core) | 1.1 | For expressions and predicates using the file/simple language
@@ -1016,6 +1058,8 @@ Number of Languages: 18 in 9 JAR artifacts (0 deprecated)
 
 | link:camel-jsonpath/src/main/docs/jsonpath-language.adoc[JsonPath] (camel-jsonpath) | 2.13 | To use JsonPath in Camel expressions or predicates.
 
+| link:camel-jxpath/src/main/docs/jxpath-language.adoc[JXPath] (camel-jxpath) | 1.3 | *deprecated* To use JXPath in Camel expressions or predicates.
+
 | link:camel-mvel/src/main/docs/mvel-language.adoc[MVEL] (camel-mvel) | 2.0 | To use MVEL scripts in Camel expressions or predicates.
 
 | link:camel-ognl/src/main/docs/ognl-language.adoc[OGNL] (camel-ognl) | 1.1 | To use OGNL scripts in Camel expressions or predicates.
@@ -1026,6 +1070,8 @@ Number of Languages: 18 in 9 JAR artifacts (0 deprecated)
 
 | link:camel-spring/src/main/docs/spel-language.adoc[SpEL] (camel-spring) | 2.7 | To use Spring Expression Language (SpEL) in Camel expressions or predicates.
 
+| link:camel-josql/src/main/docs/sql-language.adoc[SQL] (camel-josql) | 1.0 | *deprecated* To use SQL (on Java beans) in Camel expressions or predicates.
+
 | link:../camel-core/src/main/docs/tokenize-language.adoc[Tokenize] (camel-core) | 2.0 | To use Camel message body or header with a tokenizer in Camel expressions or predicates.
 
 | link:../camel-core/src/main/docs/xtokenize-language.adoc[XML Tokenize] (camel-core) | 2.14 | To use Camel message body or header with a XML tokenizer in Camel expressions or predicates.
@@ -1041,22 +1087,28 @@ Miscellaneous Components
 ^^^^^^^^^^^^^^^^^^^^^^^^
 
 // others: START
-<<<<<<< HEAD
-Number of Miscellaneous Components: 31 in 31 JAR artifacts (0 deprecated)
-=======
-Number of Miscellaneous Components: 45 in 45 JAR artifacts (14 deprecated)
->>>>>>> 6feb844... CAMEL-11888 - camel-jgroups-raft initial commit.
+Number of Miscellaneous Components: 44 in 44 JAR artifacts (13 deprecated)
 
 [width="100%",cols="4,1,5",options="header"]
 |===
 | Component | Available From | Description
 
+| link:camel-bam/src/main/docs/bam.adoc[BAM] (camel-bam) | 1.0 | *deprecated* Business Activity Monitoring
+
 | link:camel-blueprint/src/main/docs/blueprint.adoc[Blueprint] (camel-blueprint) | 2.4 | Using Camel with OSGi Blueprint
 
 | link:camel-cdi/src/main/docs/cdi.adoc[CDI] (camel-cdi) | 2.10 | Using Camel with CDI
 
 | link:camel-cxf-transport/src/main/docs/cxf-transport.adoc[CXF Transport] (camel-cxf-transport) | 2.8 | Camel Transport for Apache CXF
 
+| link:camel-eclipse/src/main/docs/eclipse.adoc[Eclipse] (camel-eclipse) | 2.3 | *deprecated* Camel classpath scanning support for running in Eclipse Desktop Applications
+
+| link:camel-groovy-dsl/src/main/docs/groovy-dsl.adoc[Groovy DSL] (camel-groovy-dsl) | 2.19 | *deprecated* Camel Groovy DSL support
+
+| link:camel-guice/src/main/docs/guice.adoc[Guice] (camel-guice) | 1.5 | *deprecated* Using Camel with Guice
+
+| link:camel-hawtdb/src/main/docs/hawtdb.adoc[HawtDB] (camel-hawtdb) | 2.3 | *deprecated* Using HawtDB as persistent EIP store
+
 | link:camel-headersmap/src/main/docs/headersmap.adoc[Headersmap] (camel-headersmap) | 2.20 | Fast case-insensitive headers map implementation
 
 | link:camel-hystrix/src/main/docs/hystrix.adoc[Hystrix] (camel-hystrix) | 2.18 | Circuit Breaker EIP using Netflix Hystrix
@@ -1075,8 +1127,18 @@ Number of Miscellaneous Components: 45 in 45 JAR artifacts (14 deprecated)
 
 | link:camel-ribbon/src/main/docs/ribbon.adoc[Ribbon] (camel-ribbon) | 2.18 | Using Netflix Ribbon for client side load balancing
 
+| link:camel-ruby/src/main/docs/ruby.adoc[Ruby] (camel-ruby) | 1.0 | *deprecated* Camel Ruby DSL
+
+| link:camel-rx/src/main/docs/rx.adoc[RX] (camel-rx) | 2.11 | *deprecated* Camel Reactive using RxJava library
+
 | link:camel-rxjava2/src/main/docs/rxjava2.adoc[Rxjava2] (camel-rxjava2) | 2.22 | RxJava2 based back-end for Camel's reactive streams component
 
+| link:camel-scala/src/main/docs/scala.adoc[Scala DSL] (camel-scala) | 1.4 | *deprecated* Camel Scala DSL
+
+| link:camel-scr/src/main/docs/scr.adoc[SCR] (camel-scr) | 2.15 | *deprecated* Camel with OSGi SCR (Declarative Services)
+
+| link:camel-servletlistener/src/main/docs/servletlistener.adoc[Servlet Listener] (camel-servletlistener) | 2.11 | *deprecated* Bootstrapping Camel using Servet Listener
+
 | link:camel-shiro/src/main/docs/shiro.adoc[Shiro] (camel-shiro) | 2.5 | Security using Shiro
 
 | link:camel-spring-boot/src/main/docs/spring-boot.adoc[Spring Boot] (camel-spring-boot) | 2.15 | Using Camel with Spring Boot
@@ -1089,12 +1151,12 @@ Number of Miscellaneous Components: 45 in 45 JAR artifacts (14 deprecated)
 
 | link:camel-spring-cloud-zookeeper/src/main/docs/spring-cloud-zookeeper.adoc[Spring Cloud Zookeeper] (camel-spring-cloud-zookeeper) | 2.19 | Camel Cloud integration with Spring Cloud Zookeeper
 
-| link:camel-spring-dm/src/main/docs/spring-dm.adoc[Spring DM] (camel-spring-dm) | 2.18 | *deprecated* Camel SpringDM (OSGi) XML DSL
-
 | link:camel-spring-javaconfig/src/main/docs/spring-javaconfig.adoc[Spring Java Configuration] (camel-spring-javaconfig) | 2.0 | Using Camel with Spring Java Configuration
 
 | link:camel-spring-security/src/main/docs/spring-security.adoc[Spring Security] (camel-spring-security) | 2.3 | Security using Spring Security
 
+| link:camel-swagger/src/main/docs/swagger.adoc[Swagger] (camel-swagger) | 2.14 | *deprecated* Rest-dsl support for using swagger api-doc (uses Scala)
+
 | link:camel-swagger-java/src/main/docs/swagger-java.adoc[Swagger Java] (camel-swagger-java) | 2.16 | Rest-dsl support for using swagger api-doc
 
 | link:camel-test/src/main/docs/test.adoc[Test] (camel-test) | 2.9 | Camel unit testing
@@ -1111,6 +1173,10 @@ Number of Miscellaneous Components: 45 in 45 JAR artifacts (14 deprecated)
 
 | link:camel-testcontainers-spring/src/main/docs/testcontainers-spring.adoc[Testcontainers Spring] (camel-testcontainers-spring) | 2.22 | Camel unit testing with Spring and testcontainers
 
+| link:camel-testng/src/main/docs/testng.adoc[TestNG] (camel-testng) | 2.8 | *deprecated* Camel unit testing with TestNG
+
+| link:camel-urlrewrite/src/main/docs/urlrewrite.adoc[URLRewrite] (camel-urlrewrite) | 2.11 | *deprecated* URL rewrite support for HTTP components
+
 | link:camel-aws-xray/src/main/docs/aws-xray.adoc[XRay] (camel-aws-xray) | 2.21 | Distributed tracing using AWS XRay
 
 | link:camel-zipkin/src/main/docs/zipkin.adoc[Zipkin] (camel-zipkin) | 2.18 | Distributed message tracing using Zipkin
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index 2b5d778..ca0cb4c 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -210,6 +210,7 @@
 	* [Braintree](braintree-component.adoc)
 	* [Caffeine Cache](caffeine-cache-component.adoc)
 	* [Caffeine LoadCache](caffeine-loadcache-component.adoc)
+	* [Camel Context](context-component.adoc)
 	* [Cassandra CQL](cql-component.adoc)
 	* [Chronicle Engine](chronicle-engine-component.adoc)
 	* [Chunk](chunk-component.adoc)
@@ -232,6 +233,7 @@
 	* [Dozer](dozer-component.adoc)
 	* [Drill](drill-component.adoc)
 	* [Dropbox](dropbox-component.adoc)
+	* [EHCache](cache-component.adoc)
 	* [Ehcache](ehcache-component.adoc)
 	* [EJB](ejb-component.adoc)
 	* [Elastichsearch Rest](elasticsearch-rest-component.adoc)
@@ -280,6 +282,7 @@
 	* [HDFS2](hdfs2-component.adoc)
 	* [Hipchat](hipchat-component.adoc)
 	* [HTTP4](http4-component.adoc)
+	* [iBatis](ibatis-component.adoc)
 	* [IEC 60870 Client](iec60870-client-component.adoc)
 	* [IEC 60870 Server](iec60870-server-component.adoc)
 	* [Ignite Cache](ignite-cache-component.adoc)
@@ -295,6 +298,7 @@
 	* [IPFS](ipfs-component.adoc)
 	* [IRC](irc-component.adoc)
 	* [IronMQ](ironmq-component.adoc)
+	* [JavaSpace](javaspace-component.adoc)
 	* [JBPM](jbpm-component.adoc)
 	* [JCache](jcache-component.adoc)
 	* [JClouds](jclouds-component.adoc)
@@ -305,6 +309,7 @@
 	* [JGroups](jgroups-component.adoc)
 	* [JGroups raft](jgroups-raft-component.adoc)
 	* [Jing](jing-component.adoc)
+	* [JIRA](jira-component.adoc)
 	* [JMS](jms-component.adoc)
 	* [JMX](jmx-component.adoc)
 	* [JOLT](jolt-component.adoc)
@@ -312,6 +317,8 @@
 	* [JSON Schema Validator](json-validator-component.adoc)
 	* [JT400](jt400-component.adoc)
 	* [Kafka](kafka-component.adoc)
+	* [Kestrel](kestrel-component.adoc)
+	* [Krati](krati-component.adoc)
 	* [Kubernetes ConfigMap](kubernetes-config-maps-component.adoc)
 	* [Kubernetes Deployments](kubernetes-deployments-component.adoc)
 	* [Kubernetes HPA](kubernetes-hpa-component.adoc)
@@ -336,6 +343,7 @@
 	* [Micrometer](micrometer-component.adoc)
 	* [Mina2](mina2-component.adoc)
 	* [MLLP](mllp-component.adoc)
+	* [MongoDB](mongodb-component.adoc)
 	* [MongoDB](mongodb3-component.adoc)
 	* [MongoDB GridFS](mongodb-gridfs-component.adoc)
 	* [MQTT](mqtt-component.adoc)
@@ -370,6 +378,7 @@
 	* [PostgresSQL Event](pgevent-component.adoc)
 	* [Printer](lpr-component.adoc)
 	* [PubNub](pubnub-component.adoc)
+	* [Quartz](quartz-component.adoc)
 	* [Quartz2](quartz2-component.adoc)
 	* [QuickFix](quickfix-component.adoc)
 	* [RabbitMQ](rabbitmq-component.adoc)
@@ -377,6 +386,7 @@
 	* [REST Swagger](rest-swagger-component.adoc)
 	* [Restlet](restlet-component.adoc)
 	* [RMI](rmi-component.adoc)
+	* [RouteBox](routebox-component.adoc)
 	* [RSS](rss-component.adoc)
 	* [Salesforce](salesforce-component.adoc)
 	* [SAP NetWeaver](sap-netweaver-component.adoc)
@@ -424,6 +434,7 @@
 	* [Web3j Ethereum Blockchain](web3j-component.adoc)
 	* [Wordpress](wordpress-component.adoc)
 	* [XChange](xchange-component.adoc)
+	* [XML RPC](xmlrpc-component.adoc)
 	* [XML Security](xmlsecurity-component.adoc)
 	* [XMPP](xmpp-component.adoc)
 	* [XQuery](xquery-component.adoc)
@@ -436,9 +447,14 @@
 
 <!-- others: START -->
 * Miscellaneous Components
+	* [BAM](bam.adoc)
 	* [Blueprint](blueprint.adoc)
 	* [CDI](cdi.adoc)
 	* [CXF Transport](cxf-transport.adoc)
+	* [Eclipse](eclipse.adoc)
+	* [Groovy DSL](groovy-dsl.adoc)
+	* [Guice](guice.adoc)
+	* [HawtDB](hawtdb.adoc)
 	* [Headersmap](headersmap.adoc)
 	* [Hystrix](hystrix.adoc)
 	* [Jasypt](jasypt.adoc)
@@ -448,16 +464,21 @@
 	* [OpenTracing](opentracing.adoc)
 	* [Reactor](reactor.adoc)
 	* [Ribbon](ribbon.adoc)
+	* [Ruby](ruby.adoc)
+	* [RX](rx.adoc)
 	* [Rxjava2](rxjava2.adoc)
+	* [Scala DSL](scala.adoc)
+	* [SCR](scr.adoc)
+	* [Servlet Listener](servletlistener.adoc)
 	* [Shiro](shiro.adoc)
 	* [Spring Boot](spring-boot.adoc)
 	* [Spring Cloud](spring-cloud.adoc)
 	* [Spring Cloud Consul](spring-cloud-consul.adoc)
 	* [Spring Cloud Netflix](spring-cloud-netflix.adoc)
 	* [Spring Cloud Zookeeper](spring-cloud-zookeeper.adoc)
-	* [Spring DM](spring-dm.adoc)
 	* [Spring Java Configuration](spring-javaconfig.adoc)
 	* [Spring Security](spring-security.adoc)
+	* [Swagger](swagger.adoc)
 	* [Swagger Java](swagger-java.adoc)
 	* [Test](test.adoc)
 	* [Test Blueprint](test-blueprint.adoc)
@@ -466,6 +487,8 @@
 	* [Test Spring](test-spring.adoc)
 	* [Testcontainers](testcontainers.adoc)
 	* [Testcontainers Spring](testcontainers-spring.adoc)
+	* [TestNG](testng.adoc)
+	* [URLRewrite](urlrewrite.adoc)
 	* [XRay](aws-xray.adoc)
 	* [Zipkin](zipkin.adoc)
 <!-- others: END -->
@@ -483,12 +506,14 @@
 	* [Bindy Fixed Length](bindy-dataformat.adoc)
 	* [Bindy Key Value Pair](bindy-dataformat.adoc)
 	* [Boon](boon-dataformat.adoc)
+	* [Castor](castor-dataformat.adoc)
 	* [Crypto (Java Cryptographic Extension)](crypto-dataformat.adoc)
 	* [CSV](csv-dataformat.adoc)
 	* [FHIR JSon](fhirJson-dataformat.adoc)
 	* [FHIR XML](fhirXml-dataformat.adoc)
 	* [Flatpack](flatpack-dataformat.adoc)
 	* [GZip](gzip-dataformat.adoc)
+	* [Hessian](hessian-dataformat.adoc)
 	* [HL7](hl7-dataformat.adoc)
 	* [iCal](ical-dataformat.adoc)
 	* [JacksonXML](jacksonxml-dataformat.adoc)
@@ -514,6 +539,9 @@
 	* [uniVocity CSV](univocity-csv-dataformat.adoc)
 	* [uniVocity Fixed Length](univocity-fixed-dataformat.adoc)
 	* [uniVocity TSV](univocity-tsv-dataformat.adoc)
+	* [XML Beans](xmlBeans-dataformat.adoc)
+	* [XML JSon](xmljson-dataformat.adoc)
+	* [XML RPC](xmlrpc-dataformat.adoc)
 	* [XML Security](secureXML-dataformat.adoc)
 	* [XStream](xstream-dataformat.adoc)
 	* [YAML SnakeYAML](yaml-snakeyaml-dataformat.adoc)
@@ -527,6 +555,7 @@
 * Expression Languages
 	* [Bean method](bean-language.adoc)
 	* [Constant](constant-language.adoc)
+	* [EL](el-language.adoc)
 	* [ExchangeProperty](exchangeProperty-language.adoc)
 	* [File](file-language.adoc)
 	* [Groovy](groovy-language.adoc)
@@ -534,11 +563,13 @@
 	* [HL7 Terser](terser-language.adoc)
 	* [JavaScript](javaScript-language.adoc)
 	* [JsonPath](jsonpath-language.adoc)
+	* [JXPath](jxpath-language.adoc)
 	* [MVEL](mvel-language.adoc)
 	* [OGNL](ognl-language.adoc)
 	* [Ref](ref-language.adoc)
 	* [Simple](simple-language.adoc)
 	* [SpEL](spel-language.adoc)
+	* [SQL](sql-language.adoc)
 	* [Tokenize](tokenize-language.adoc)
 	* [XML Tokenize](xtokenize-language.adoc)
 	* [XPath](xpath-language.adoc)
diff --git a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/pom.xml b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/pom.xml
index a7d8e52..6183247 100644
--- a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/pom.xml
+++ b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.camel</groupId>
     <artifactId>components-starter</artifactId>
-    <version>2.24.0-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>camel-jgroups-raft-starter</artifactId>
   <packaging>jar</packaging>
diff --git a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/cluster/springboot/JGroupsRaftClusterServiceAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/cluster/springboot/JGroupsRaftClusterServiceAutoConfiguration.java
index 81f7a08..884d7c7 100644
--- a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/cluster/springboot/JGroupsRaftClusterServiceAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/cluster/springboot/JGroupsRaftClusterServiceAutoConfiguration.java
@@ -20,7 +20,7 @@ import org.apache.camel.cluster.CamelClusterService;
 import org.apache.camel.component.jgroups.raft.cluster.JGroupsRaftClusterService;
 import org.apache.camel.spring.boot.CamelAutoConfiguration;
 import org.apache.camel.spring.boot.cluster.ClusteredRouteControllerAutoConfiguration;
-import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.support.IntrospectionSupport;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.config.ConfigurableBeanFactory;
 import org.springframework.boot.autoconfigure.AutoConfigureBefore;
diff --git a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
index da5141a..6fe3196 100644
--- a/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
+++ b/platforms/spring-boot/spring-boot-dm/camel-spring-boot-dependencies/pom.xml
@@ -73,7 +73,7 @@
       <dependency>
         <groupId>com.alibaba</groupId>
         <artifactId>fastjson</artifactId>
-        <version>1.2.51</version>
+        <version>1.2.54</version>
       </dependency>
       <dependency>
         <groupId>com.atlassian.jira</groupId>
@@ -208,7 +208,7 @@
       <dependency>
         <groupId>net.sf.saxon</groupId>
         <artifactId>Saxon-HE</artifactId>
-        <version>9.8.0-14</version>
+        <version>9.9.0-2</version>
       </dependency>
       <dependency>
         <groupId>ognl</groupId>
@@ -1585,6 +1585,16 @@
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
+        <artifactId>camel-jgroups-raft</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-jgroups-raft-starter</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
         <artifactId>camel-jgroups-starter</artifactId>
         <version>${project.version}</version>
       </dependency>


[camel] 02/03: CAMEL-11888 - Fixed backport from 2.x and regen

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch sandbox/camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 85d434dba98684a8b6f77ad71a838b94fea81243
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Dec 10 11:48:44 2018 +0100

    CAMEL-11888 - Fixed backport from 2.x and regen
---
 components/camel-jgroups-raft/pom.xml                                  | 2 +-
 .../apache/camel/component/jgroups/raft/CamelRoleChangeListener.java   | 2 +-
 .../org/apache/camel/component/jgroups/raft/JGroupsRaftComponent.java  | 3 ++-
 .../org/apache/camel/component/jgroups/raft/JGroupsRaftConsumer.java   | 2 +-
 .../org/apache/camel/component/jgroups/raft/JGroupsRaftEndpoint.java   | 3 ++-
 .../org/apache/camel/component/jgroups/raft/JGroupsRaftProducer.java   | 2 +-
 .../camel/component/jgroups/raft/cluster/JGroupsRaftClusterView.java   | 2 +-
 .../jgroups/raft/cluster/JGroupsRaftClusteredRoutePolicyTest.java      | 2 +-
 .../jgroups/raft/springboot/JGroupsRaftComponentAutoConfiguration.java | 2 +-
 9 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/components/camel-jgroups-raft/pom.xml b/components/camel-jgroups-raft/pom.xml
index cdfa72c..5308566 100644
--- a/components/camel-jgroups-raft/pom.xml
+++ b/components/camel-jgroups-raft/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.camel</groupId>
         <artifactId>components</artifactId>
-        <version>2.24.0-SNAPSHOT</version>
+        <version>3.0.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>camel-jgroups-raft</artifactId>
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/CamelRoleChangeListener.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/CamelRoleChangeListener.java
index 92eeb39..7058b53 100644
--- a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/CamelRoleChangeListener.java
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/CamelRoleChangeListener.java
@@ -20,7 +20,7 @@ import org.apache.camel.AsyncCallback;
 import org.apache.camel.AsyncProcessor;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
-import org.apache.camel.util.AsyncProcessorConverterHelper;
+import org.apache.camel.support.AsyncProcessorConverterHelper;
 import org.apache.camel.util.ObjectHelper;
 import org.jgroups.protocols.raft.RAFT;
 import org.jgroups.protocols.raft.Role;
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponent.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponent.java
index e299b6f..a9b0c6b 100644
--- a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponent.java
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponent.java
@@ -20,9 +20,10 @@ import java.util.Map;
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.component.jgroups.raft.utils.NopStateMachine;
-import org.apache.camel.impl.DefaultComponent;
+
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriParam;
+import org.apache.camel.support.DefaultComponent;
 import org.jgroups.protocols.raft.StateMachine;
 import org.jgroups.raft.RaftHandle;
 import org.slf4j.Logger;
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConsumer.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConsumer.java
index 58b9340..7d4eaf0 100644
--- a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConsumer.java
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConsumer.java
@@ -17,7 +17,7 @@
 package org.apache.camel.component.jgroups.raft;
 
 import org.apache.camel.Processor;
-import org.apache.camel.impl.DefaultConsumer;
+import org.apache.camel.support.DefaultConsumer;
 import org.jgroups.raft.RaftHandle;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEndpoint.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEndpoint.java
index 615557e..a24a5b6 100644
--- a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEndpoint.java
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEndpoint.java
@@ -24,11 +24,12 @@ import org.apache.camel.Consumer;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
-import org.apache.camel.impl.DefaultEndpoint;
+
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriPath;
+import org.apache.camel.support.DefaultEndpoint;
 import org.jgroups.JChannel;
 import org.jgroups.protocols.raft.StateMachine;
 import org.jgroups.raft.RaftHandle;
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftProducer.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftProducer.java
index b0a3d74..6415bcf 100644
--- a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftProducer.java
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftProducer.java
@@ -19,7 +19,7 @@ package org.apache.camel.component.jgroups.raft;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.camel.Exchange;
-import org.apache.camel.impl.DefaultProducer;
+import org.apache.camel.support.DefaultProducer;
 import org.jgroups.raft.RaftHandle;
 
 /**
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterView.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterView.java
index b7d51fe..ed8c91d 100644
--- a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterView.java
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterView.java
@@ -24,7 +24,7 @@ import org.apache.camel.cluster.CamelClusterMember;
 import org.apache.camel.cluster.CamelClusterService;
 import org.apache.camel.component.jgroups.raft.JGroupsRaftConstants;
 import org.apache.camel.component.jgroups.raft.utils.NopStateMachine;
-import org.apache.camel.impl.cluster.AbstractCamelClusterView;
+import org.apache.camel.support.cluster.AbstractCamelClusterView;
 import org.jgroups.JChannel;
 import org.jgroups.raft.RaftHandle;
 import org.slf4j.Logger;
diff --git a/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusteredRoutePolicyTest.java b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusteredRoutePolicyTest.java
index cc62187..6c2c1e9 100644
--- a/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusteredRoutePolicyTest.java
+++ b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusteredRoutePolicyTest.java
@@ -108,7 +108,7 @@ public class JGroupsRaftClusteredRoutePolicyTest extends JGroupsRaftClusterAbast
             throw new UnsupportedOperationException("CamelContext list and Route ids list must have the same number of elements!");
         }
         for (int i = 0; i < lcc.size(); i++) {
-            ServiceStatus status = lcc.get(i).getRouteStatus(rn.get(i));
+            ServiceStatus status = lcc.get(i).getRouteController().getRouteStatus(rn.get(i));
             if (ServiceStatus.Starting.equals(status) || ServiceStatus.Started.equals(status)) {
                 result++;
             }
diff --git a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/JGroupsRaftComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/JGroupsRaftComponentAutoConfiguration.java
index c5f62da..95803c0 100644
--- a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/JGroupsRaftComponentAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/JGroupsRaftComponentAutoConfiguration.java
@@ -30,7 +30,7 @@ import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
 import org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans;
 import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
-import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.support.IntrospectionSupport;
 import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;


[camel] 01/03: CAMEL-11888 - camel-jgroups-raft initial commit.

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch sandbox/camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 0b13d052d3afe5762ec38b6aa58f80a3fd4f0a86
Author: Andrea Tarocchi <at...@redhat.com>
AuthorDate: Tue Nov 20 00:14:21 2018 +0100

    CAMEL-11888 - camel-jgroups-raft initial commit.
    
    Conflicts:
    	components/readme.adoc
    	docs/user-manual/en/SUMMARY.md
---
 apache-camel/pom.xml                               |   9 +
 apache-camel/src/main/descriptors/common-bin.xml   |   2 +
 bom/camel-bom/pom.xml                              |  10 +
 components/camel-jgroups-raft/pom.xml              | 101 ++++++++++
 .../src/main/docs/jgroups-raft-component.adoc      | 197 +++++++++++++++++++
 .../jgroups/raft/CamelRoleChangeListener.java      |  79 ++++++++
 .../jgroups/raft/JGroupsRaftComponent.java         | 102 ++++++++++
 .../jgroups/raft/JGroupsRaftConstants.java         |  38 ++++
 .../jgroups/raft/JGroupsRaftConsumer.java          |  69 +++++++
 .../jgroups/raft/JGroupsRaftEndpoint.java          | 216 +++++++++++++++++++++
 .../jgroups/raft/JGroupsRaftEventType.java         |  26 +++
 .../jgroups/raft/JGroupsRaftException.java         |  30 +++
 .../jgroups/raft/JGroupsRaftProducer.java          |  87 +++++++++
 .../raft/cluster/ClusterRoleChangeListener.java    |  67 +++++++
 .../raft/cluster/JGroupsRaftClusterService.java    |  80 ++++++++
 .../raft/cluster/JGroupsRaftClusterView.java       | 149 ++++++++++++++
 .../jgroups/raft/utils/NopStateMachine.java        |  47 +++++
 .../src/main/resources/LICENSE.txt                 | 203 +++++++++++++++++++
 .../org/apache/camel/component/jgroups-raft        |  18 ++
 .../src/main/resources/NOTICE.txt                  |  11 ++
 .../camel-jgroups-raft/src/main/resources/raft.xml |  40 ++++
 .../jgroups/raft/JGroupsRaftAbstractTest.java      |  49 +++++
 .../raft/JGroupsRaftComponentConfiguredTest.java   |  74 +++++++
 .../raft/JGroupsRaftComponentDefaultTest.java      |  59 ++++++
 .../jgroups/raft/JGroupsRaftConsumerTest.java      |  90 +++++++++
 .../jgroups/raft/JGroupsRaftEndpointTest.java      |  94 +++++++++
 .../jgroups/raft/JGroupsRaftProducerTest.java      |  66 +++++++
 .../cluster/JGroupsRaftClusterAbastractTest.java   |  35 ++++
 .../JGroupsRaftClusteredRoutePolicyTest.java       | 118 +++++++++++
 .../raft/cluster/JGroupsRaftMasterTest.java        | 127 ++++++++++++
 .../src/test/resources/log4j2.properties           |  36 ++++
 .../camel-jgroups-raft/src/test/resources/raft.xml |  49 +++++
 .../src/test/resources/raftABC.xml                 |  49 +++++
 .../src/test/resources/raftB.xml                   |  49 +++++
 .../src/test/resources/raftC.xml                   |  49 +++++
 components/pom.xml                                 |   1 +
 components/readme.adoc                             |  18 ++
 docs/user-manual/en/SUMMARY.md                     |   4 +
 parent/pom.xml                                     |  14 ++
 .../karaf/features/src/main/resources/features.xml |  11 ++
 .../camel-jgroups-raft-starter/pom.xml             |  53 +++++
 .../JGroupsRaftComponentAutoConfiguration.java     | 129 ++++++++++++
 .../JGroupsRaftComponentConfiguration.java         | 105 ++++++++++
 ...JGroupsRaftClusterServiceAutoConfiguration.java |  53 +++++
 .../JGroupsRaftClusterServiceConfiguration.java    |  89 +++++++++
 .../src/main/resources/META-INF/LICENSE.txt        | 203 +++++++++++++++++++
 .../src/main/resources/META-INF/NOTICE.txt         |  11 ++
 .../additional-spring-configuration-metadata.json  |  10 +
 .../src/main/resources/META-INF/spring.factories   |  21 ++
 .../src/main/resources/META-INF/spring.provides    |  17 ++
 platforms/spring-boot/components-starter/pom.xml   |   1 +
 .../camel/itest/karaf/CamelJgroupsRaftTest.java    |  34 ++++
 .../itest/springboot/CamelJgroupsRaftTest.java     |  48 +++++
 53 files changed, 3347 insertions(+)

diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml
index a0d69cb..c69602f 100644
--- a/apache-camel/pom.xml
+++ b/apache-camel/pom.xml
@@ -508,6 +508,10 @@
     </dependency>
     <dependency>
       <groupId>org.apache.camel</groupId>
+      <artifactId>camel-jgroups-raft</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
       <artifactId>camel-jibx</artifactId>
     </dependency>
     <dependency>
@@ -1629,6 +1633,11 @@
     </dependency>
     <dependency>
       <groupId>org.apache.camel</groupId>
+      <artifactId>camel-jgroups-raft-starter</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
       <artifactId>camel-jibx-starter</artifactId>
       <version>${project.version}</version>
     </dependency>
diff --git a/apache-camel/src/main/descriptors/common-bin.xml b/apache-camel/src/main/descriptors/common-bin.xml
index e510a82..5b300f9 100644
--- a/apache-camel/src/main/descriptors/common-bin.xml
+++ b/apache-camel/src/main/descriptors/common-bin.xml
@@ -138,6 +138,7 @@
         <include>org.apache.camel:camel-jetty</include>
         <include>org.apache.camel:camel-jetty9</include>
         <include>org.apache.camel:camel-jgroups</include>
+        <include>org.apache.camel:camel-jgroups-raft</include>
         <include>org.apache.camel:camel-jibx</include>
         <include>org.apache.camel:camel-jing</include>
         <include>org.apache.camel:camel-jms</include>
@@ -425,6 +426,7 @@
         <include>org.apache.camel:camel-jetty-common-starter</include>
         <include>org.apache.camel:camel-jetty-starter</include>
         <include>org.apache.camel:camel-jgroups-starter</include>
+        <include>org.apache.camel:camel-jgroups-raft-starter</include>
         <include>org.apache.camel:camel-jibx-starter</include>
         <include>org.apache.camel:camel-jing-starter</include>
         <include>org.apache.camel:camel-jms-starter</include>
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index fbd460e..d3055ba 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -1360,6 +1360,16 @@
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
+        <artifactId>camel-jgroups-raft</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-jgroups-raft-starter</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
         <artifactId>camel-jgroups-starter</artifactId>
         <version>${project.version}</version>
       </dependency>
diff --git a/components/camel-jgroups-raft/pom.xml b/components/camel-jgroups-raft/pom.xml
new file mode 100644
index 0000000..cdfa72c
--- /dev/null
+++ b/components/camel-jgroups-raft/pom.xml
@@ -0,0 +1,101 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>components</artifactId>
+        <version>2.24.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>camel-jgroups-raft</artifactId>
+    <packaging>jar</packaging>
+    <name>Camel :: jgroups-raft</name>
+    <description>Camel jgroups-raft support</description>
+
+    <properties>
+        <camel.osgi.export.pkg>org.apache.camel.component.jgroups-raft</camel.osgi.export.pkg>
+        <camel.osgi.export.service>org.apache.camel.spi.ComponentResolver;component=jgroups-raft</camel.osgi.export.service>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jgroups</groupId>
+            <artifactId>jgroups-raft</artifactId>
+            <version>${jgroups-raft-version}</version>
+        </dependency>
+
+        <!-- Testing dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-test</artifactId>
+            <scope>test</scope>
+        </dependency>   
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-slf4j-impl</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-master</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    
+    <build>
+       <plugins>
+          <plugin>
+             <artifactId>maven-surefire-plugin</artifactId>
+             <configuration>
+                <systemPropertyVariables>
+                    <jgroups.bind_addr>127.0.0.1</jgroups.bind_addr>
+                </systemPropertyVariables>
+                <argLine>${camel.surefire.fork.vmargs} -Djava.net.preferIPv4Stack=true</argLine>
+             </configuration>
+          </plugin>
+       </plugins>
+    </build>
+</project>
diff --git a/components/camel-jgroups-raft/src/main/docs/jgroups-raft-component.adoc b/components/camel-jgroups-raft/src/main/docs/jgroups-raft-component.adoc
new file mode 100644
index 0000000..ba49846
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/docs/jgroups-raft-component.adoc
@@ -0,0 +1,197 @@
+[[jgroups-raft-component]]
+== JGroups raft Component
+
+*Available as of Camel version 2.24*
+
+http://belaban.github.io/jgroups-raft/[JGroups-raft] is a https://raftconsensus.github.io/[Raft] implementation in http://www.jgroups.org/[JGroups].
+The *jgroups-raft:* component provides interoperability between camel and a JGroups-raft clusters.
+
+Maven users will need to add the following dependency to their `pom.xml`
+for this component.
+
+[source,xml]
+------------------------------------------------------------
+<dependency>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-jgroups-raft</artifactId>
+    <!-- use the same version as your Camel core version -->
+    <version>x.y.z</version>
+</dependency>
+------------------------------------------------------------
+
+### URI format
+
+[source,java]
+-----------------------------
+jgroups-raft:clusterName[?options]
+-----------------------------
+
+Where *clusterName* represents the name of the JGroups-raft cluster the
+component should connect to.
+
+### Options
+
+// component options: START
+The JGroups raft component supports 5 options, which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *raftHandle* (common) | RaftHandle to use. |  | RaftHandle
+| *stateMachine* (common) | StateMachine to use. | NopStateMachine | StateMachine
+| *raftId* (common) | *Required* Unique raftId to use. |  | String
+| *channelProperties* (common) | Specifies configuration properties of the RaftHandle JChannel used by the endpoint (ignored if raftHandle ref is provided). | raft.xml | String
+| *resolveProperty Placeholders* (advanced) | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | boolean
+|===
+// component options: END
+
+// endpoint options: START
+The JGroups raft endpoint is configured using URI syntax:
+
+----
+jgroups-raft:clusterName
+----
+
+with the following path and query parameters:
+
+==== Path Parameters (1 parameters):
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *clusterName* | *Required* The name of the JGroupsraft cluster the component should connect to. |  | String
+|===
+
+
+==== Query Parameters (5 parameters):
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
+| *enableRoleChangeEvents* (consumer) | If set to true, the consumer endpoint will receive roleChange event as well (not just connecting and/or using the state machine). By default it is set to false. | false | boolean
+| *exceptionHandler* (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
+| *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
+| *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
+|===
+// endpoint options: END
+
+// spring-boot-auto-configure options: START
+=== Spring Boot Auto-Configuration
+
+
+The component supports 11 options, which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *camel.component.jgroups-raft.channel-properties* | Specifies configuration properties of the RaftHandle JChannel used by the endpoint (ignored if raftHandle ref is provided). | raft.xml | String
+| *camel.component.jgroups-raft.enabled* | Enable jgroups-raft component | true | Boolean
+| *camel.component.jgroups-raft.raft-handle* | RaftHandle to use. The option is a org.jgroups.raft.RaftHandle type. |  | String
+| *camel.component.jgroups-raft.raft-id* | Unique raftId to use. |  | String
+| *camel.component.jgroups-raft.resolve-property-placeholders* | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | Boolean
+| *camel.component.jgroups-raft.state-machine* | StateMachine to use. The option is a org.jgroups.protocols.raft.StateMachine type. |  | String
+| *camel.component.jgroups.raft.cluster.service.enabled* | Sets if the jgroups raft cluster service should be enabled or not, default is false. | false | Boolean
+| *camel.component.jgroups.raft.cluster.service.id* | Cluster Service ID |  | String
+| *camel.component.jgroups.raft.cluster.service.jgroups-raft-cluster-name* | JGroups Cluster name |  | String
+| *camel.component.jgroups.raft.cluster.service.jgroups-raft-config* | JGrups-raft configuration File name |  | String
+| *camel.component.jgroups.raft.cluster.service.raft-id* | JGroups-raft ID |  | String
+|===
+// spring-boot-auto-configure options: END
+
+### Headers
+
+[width="100%",cols="10%,10%,10%,70%",options="header",]
+|=======================================================================
+|Header |Constant |Since version |Description
+
+|`JGROUPSRAFT_COMMIT_INDEX` |`JGroupsRaftEndpoint.HEADER_JGROUPSRAFT_COMMIT_INDEX` |*2.24.0* | *Consumer* : The commit index (int).
+
+|`JGROUPSRAFT_CURRENT_TERM` |`JGroupsRaftEndpoint.`HEADER_JGROUPSRAFT_CURRENT_TERM` |*2.24.0* | *Consumer* : The current raft term (int).
+
+|`JGROUPSRAFT_IS_LEADER` |`JGroupsRaftEndpoint.`HEADER_JGROUPSRAFT_IS_LEADER` |*2.24.0* | *Consumer*: Whether the node is the Raft Leader or not (boolean).
+
+|`JGROUPSRAFT_LAST_APPLIED` |`JGroupsRaftEndpoint.`HEADER_JGROUPSRAFT_LAST_APPLIED` |*2.24.0* | *Consumer*: The index of the last log entry that was appended to the log (int).
+
+|`JGROUPSRAFT_LEADER_ADDRESS` |`JGroupsRaftEndpoint.`HEADER_JGROUPSRAFT_LEADER_ADDRESS` |*2.24.0* | *Consumer*: The Address ot Raft Leader or not (org.jgroups.Address).
+
+|`JGROUPSRAFT_LOG_SIZE` |`JGroupsRaftEndpoint.`HEADER_JGROUPSRAFT_LOG_SIZE` |*2.24.0* | *Consumer*: The Raft log size in number of entries (int).
+
+|`JGROUPSRAFT_LOG_SIZE_BYTE` |`JGroupsRaftEndpoint.`HEADER_JGROUPSRAFT_LOG_SIZE_BYTE` |*2.24.0* | *Consumer*: The Raft log size in bytes (int).
+
+|`JGROUPSRAFT_RAFT_ID` |`JGroupsRaftEndpoint.`HEADER_JGROUPSRAFT_RAFT_ID` |*2.24.0* | *Consumer*: The Raft id of the node (String).
+
+|`JGROUPSRAFT_EVENT_TYPE` |`JGroupsRaftEndpoint.`HEADER_JGROUPSRAFT_EVENT_TYPE` |*2.24.0* | *Consumer*: The event type, one of org.apache.camel.component.jgroups.raft.JGroupsRaftEventType ENUM.
+
+|`JGROUPSRAFT_SET_OFFSET` |`JGroupsRaftEndpoint.`HEADER_JGROUPSRAFT_SET_OFFSET` |*2.24.0* | *Producer*: Offset to use in the byte[] buffer to be set().
+
+|`JGROUPSRAFT_SET_LENGTH` |`JGroupsRaftEndpoint.`HEADER_JGROUPSRAFT_SET_LENGTH` |*2.24.0* | *Producer*: Length to use in the byte[] buffer to be set().
+
+|`JGROUPSRAFT_SET_TIMEOUT` |`JGroupsRaftEndpoint.`HEADER_JGROUPSRAFT_SET_TIMEOUT` |*2.24.0* | *Producer*: Timeout to be used in set() operation.
+
+|`JGROUPSRAFT_SET_TIMEUNIT` |`JGroupsRaftEndpoint.`HEADER_JGROUPSRAFT_SET_TIMEUNIT` |*2.24.0* | *Producer*: Timeunit to be used in set() operation.
+|=======================================================================
+ 
+### Usage
+
+Using `jgroups-raft` component with `enableRoleChangeEvents=true` on the consumer side of the route will capture
+change in JGrups-raft role and forward them to the Camel route.
+JGroups-raft consumer processes incoming messages
+http://camel.apache.org/asynchronous-routing-engine.html[asynchronously].
+
+[source,java]
+----------------------------------------------
+// Capture raft role changes from cluster named
+// 'clusterName' and send them to Camel route.
+from("jgroups-raft:clusterName?enableRoleChangeEvents=true").to("seda:queue");
+----------------------------------------------
+
+Using `jgroups-raft` component on the producer side of the route will use the body of the camel exchange (which must be a `byte[]`)
+to perform a setX() operation on the raftHandle associated with the endpoint..
+
+[source,java]
+--------------------------------------------------
+// perform a setX() operation to the cluster named 'clusterName' shared state machine
+from("direct:start").to("jgroups-raft:clusterName");
+--------------------------------------------------
+
+### Examples
+
+#### Receive cluster view change notifications
+
+The snippet below demonstrates how to create the consumer endpoint
+listening to the change role events. By default this option is off.
+
+[source,java]
+---------------------------------------------------------------------
+...
+from("jgroups-raft:clusterName?enableRoleChangeEvents=true").to(mock:mockEndpoint);
+...
+---------------------------------------------------------------------
+
+#### Keeping singleton route within the cluster
+
+The snippet below demonstrates how to keep the singleton consumer route
+in the cluster of Camel Contexts. As soon as the master node dies, one
+of the slaves will be elected as a new master and started. In this
+particular example we want to keep singleton <<jetty-component,jetty>>
+instance listening for the requests on
+address` http://localhost:8080/orders`.
+
+[source,java]
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------
+JGroupsRaftClusterService service = new JGroupsRaftClusterService();
+service.setId("raftId");
+service.setRaftId("raftId");
+service.setJgroupsClusterName("clusterName");
+...
+context.addService(service);
+
+from("master:mycluster:jetty:http://localhost:8080/orders").to("jms:orders"); 
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------
\ No newline at end of file
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/CamelRoleChangeListener.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/CamelRoleChangeListener.java
new file mode 100644
index 0000000..92eeb39
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/CamelRoleChangeListener.java
@@ -0,0 +1,79 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft;
+
+import org.apache.camel.AsyncCallback;
+import org.apache.camel.AsyncProcessor;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.util.AsyncProcessorConverterHelper;
+import org.apache.camel.util.ObjectHelper;
+import org.jgroups.protocols.raft.RAFT;
+import org.jgroups.protocols.raft.Role;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class CamelRoleChangeListener implements RAFT.RoleChange {
+    private static final transient Logger LOG = LoggerFactory.getLogger(CamelRoleChangeListener.class);
+
+    private final JGroupsRaftEndpoint endpoint;
+    private final AsyncProcessor processor;
+
+    public CamelRoleChangeListener(JGroupsRaftEndpoint endpoint, Processor processor) {
+        ObjectHelper.notNull(endpoint, "endpoint");
+        ObjectHelper.notNull(processor, "processor");
+
+        this.endpoint = endpoint;
+        this.processor = AsyncProcessorConverterHelper.convert(processor);
+    }
+
+    @Override
+    public void roleChanged(Role role) {
+        LOG.trace("New Role {} received.", role);
+        Exchange exchange = endpoint.createExchange();
+        switch (role) {
+        case Leader:
+            exchange.getIn().setHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_EVENT_TYPE, JGroupsRaftEventType.LEADER);
+            processExchange(role, exchange);
+            break;
+        case Follower:
+            exchange.getIn().setHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_EVENT_TYPE, JGroupsRaftEventType.FOLLOWER);
+            processExchange(role, exchange);
+            break;
+        case Candidate:
+            exchange.getIn().setHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_EVENT_TYPE, JGroupsRaftEventType.CANDIDATE);
+            processExchange(role, exchange);
+            break;
+        default:
+            throw new JGroupsRaftException("Role [" + role + "] unknown.");
+        }
+    }
+
+    private void processExchange(Role role, Exchange exchange) {
+        try {
+            LOG.debug("Processing Role: {}", role);
+            processor.process(exchange, new AsyncCallback() {
+                @Override
+                public void done(boolean doneSync) {
+                    // noop
+                }
+            });
+        } catch (Exception e) {
+            throw new JGroupsRaftException("Error in consumer while dispatching exchange containing role " + role, e);
+        }
+    }
+}
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponent.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponent.java
new file mode 100644
index 0000000..e299b6f
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponent.java
@@ -0,0 +1,102 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft;
+
+import java.util.Map;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.component.jgroups.raft.utils.NopStateMachine;
+import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.UriParam;
+import org.jgroups.protocols.raft.StateMachine;
+import org.jgroups.raft.RaftHandle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Component providing support for JGroups-raft leader election and shared state machine implementation ({@code org.jgroups.raft.RaftHandle}).
+ */
+public class JGroupsRaftComponent extends DefaultComponent {
+    private static final Logger LOG = LoggerFactory.getLogger(JGroupsRaftComponent.class);
+
+    @UriParam
+    @Metadata(defaultValue = "null")
+    private RaftHandle raftHandle;
+    @UriParam
+    @Metadata(defaultValue = "NopStateMachine")
+    private StateMachine stateMachine = new NopStateMachine();
+    @UriParam
+    @Metadata(required = "true")
+    private String raftId;
+    @UriParam
+    @Metadata(defaultValue = "raft.xml")
+    private String channelProperties;
+
+    @Override
+    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) {
+        return new JGroupsRaftEndpoint(uri, remaining, this, remaining, parameters, raftId, channelProperties, stateMachine, raftHandle);
+    }
+
+    public RaftHandle getRaftHandle() {
+        return raftHandle;
+    }
+
+    /**
+     * RaftHandle to use.
+     */
+    public void setRaftHandle(RaftHandle raftHandle) {
+        this.raftHandle = raftHandle;
+    }
+
+    public StateMachine getStateMachine() {
+        return stateMachine;
+    }
+
+    /**
+     *
+     * StateMachine to use.
+     */
+    public void setStateMachine(StateMachine stateMachine) {
+        this.stateMachine = stateMachine;
+    }
+
+    public String getRaftId() {
+        return raftId;
+    }
+
+    /**
+     *
+     * Unique raftId to use.
+     */
+    public void setRaftId(String raftId) {
+        this.raftId = raftId;
+    }
+
+    public String getChannelProperties() {
+        return channelProperties;
+    }
+
+    /**
+     * Specifies configuration properties of the RaftHandle JChannel used by the endpoint (ignored if raftHandle ref is provided).
+     */
+    public void setChannelProperties(String channelProperties) {
+        this.channelProperties = channelProperties;
+    }
+
+    //TODO: implement a org.jgroups.protocols.raft.StateMachine as a Camel Consumer.
+}
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConstants.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConstants.java
new file mode 100644
index 0000000..8a86b17
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConstants.java
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft;
+
+public final class JGroupsRaftConstants {
+    public static final String HEADER_JGROUPSRAFT_LOG_SIZE = "JGROUPSRAFT_LOG_SIZE";
+    public static final String DEFAULT_JGROUPSRAFT_CONFIG = "raft.xml";
+    public static final String HEADER_JGROUPSRAFT_COMMIT_INDEX = "JGROUPSRAFT_COMMIT_INDEX";
+    public static final String HEADER_JGROUPSRAFT_CURRENT_TERM = "JGROUPSRAFT_CURRENT_TERM";
+    public static final String HEADER_JGROUPSRAFT_IS_LEADER = "JGROUPSRAFT_IS_LEADER";
+    public static final String HEADER_JGROUPSRAFT_LAST_APPLIED = "JGROUPSRAFT_LAST_APPLIED";
+    public static final String HEADER_JGROUPSRAFT_LEADER_ADDRESS = "JGROUPSRAFT_LEADER_ADDRESS";
+    public static final String HEADER_JGROUPSRAFT_LOG_SIZE_BYTE = "JGROUPSRAFT_LOG_SIZE_BYTE";
+    public static final String HEADER_JGROUPSRAFT_RAFT_ID = "JGROUPSRAFT_RAFT_ID";
+    public static final String HEADER_JGROUPSRAFT_EVENT_TYPE = "JGROUPSRAFT_EVENT_TYPE";
+    public static final String HEADER_JGROUPSRAFT_SET_OFFSET = "JGROUPSRAFT_SET_OFFSET";
+    public static final String HEADER_JGROUPSRAFT_SET_LENGTH = "JGROUPSRAFT_SET_LENGTH";
+    public static final String HEADER_JGROUPSRAFT_SET_TIMEOUT = "JGROUPSRAFT_SET_TIMEOUT";
+    public static final String HEADER_JGROUPSRAFT_SET_TIMEUNIT = "JGROUPSRAFT_SET_TIMEUNIT";
+
+    private JGroupsRaftConstants() {
+        //utility class
+    }
+}
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConsumer.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConsumer.java
new file mode 100644
index 0000000..58b9340
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConsumer.java
@@ -0,0 +1,69 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft;
+
+import org.apache.camel.Processor;
+import org.apache.camel.impl.DefaultConsumer;
+import org.jgroups.raft.RaftHandle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Consumes events from the JGroups-raft RaftHandle ({@code org.jgroups.raft.RaftHandle}). Received events
+ * are routed to Camel as body and/or headers of {@link org.apache.camel.Exchange} see {@link JGroupsRaftEventType}.
+ */
+public class JGroupsRaftConsumer extends DefaultConsumer {
+    private static final transient Logger LOG = LoggerFactory.getLogger(JGroupsRaftConsumer.class);
+
+    private final RaftHandle raftHandle;
+    private final String clusterName;
+    private boolean enableRoleChangeEvents;
+
+    private final CamelRoleChangeListener roleListener;
+    private final JGroupsRaftEndpoint endpoint;
+
+    public JGroupsRaftConsumer(JGroupsRaftEndpoint endpoint, Processor processor, RaftHandle raftHandle, String clusterName, boolean enableRoleChangeEvents) {
+        super(endpoint, processor);
+
+        this.endpoint = endpoint;
+        this.raftHandle = raftHandle;
+        this.clusterName = clusterName;
+        this.enableRoleChangeEvents = enableRoleChangeEvents;
+
+        this.roleListener = new CamelRoleChangeListener(endpoint, processor);
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+        if (enableRoleChangeEvents) {
+            LOG.debug("Connecting roleListener : {} to the cluster: {}.", roleListener, clusterName);
+            raftHandle.addRoleListener(roleListener);
+        }
+        endpoint.connect();
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        if (enableRoleChangeEvents) {
+            LOG.debug("Closing connection to cluster: {} from roleListener: {}.", clusterName, roleListener);
+            raftHandle.removeRoleListener(roleListener);
+        }
+        endpoint.disconnect();
+        super.doStop();
+    }
+}
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEndpoint.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEndpoint.java
new file mode 100644
index 0000000..615557e
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEndpoint.java
@@ -0,0 +1,216 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft;
+
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.camel.Component;
+import org.apache.camel.Consumer;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
+import org.jgroups.JChannel;
+import org.jgroups.protocols.raft.StateMachine;
+import org.jgroups.raft.RaftHandle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The jgroups component provides exchange of messages between Camel and JGroups clusters.
+ */
+@UriEndpoint(firstVersion = "2.24.0", scheme = "jgroups-raft", title = "JGroups raft", syntax = "jgroup-raft:clusterName", consumerClass = JGroupsRaftConsumer.class, label = "clustering,messaging")
+public class JGroupsRaftEndpoint extends DefaultEndpoint {
+    private static final Logger LOG = LoggerFactory.getLogger(JGroupsRaftEndpoint.class);
+
+    private AtomicInteger connectCount = new AtomicInteger(0);
+
+    private RaftHandle raftHandle;
+    private RaftHandle resolvedRaftHandle;
+    private StateMachine stateMachine;
+    private String raftId;
+    private String channelProperties;
+
+    @UriPath @Metadata(required = "true")
+    private String clusterName;
+    @UriParam(label = "consumer", defaultValue = "false")
+    private boolean enableRoleChangeEvents;
+
+    public JGroupsRaftEndpoint(String endpointUri, String clusterName, Component component, String remaining, Map<String, Object> parameters,
+                               String raftId, String channelProperties, StateMachine stateMachine, RaftHandle raftHandle) {
+        super(endpointUri, component);
+        this.clusterName = clusterName;
+
+        this.raftId = raftId;
+        this.channelProperties = channelProperties;
+        this.stateMachine = stateMachine;
+        this.raftHandle = raftHandle;
+    }
+
+    @Override
+    public Producer createProducer() throws Exception {
+        return new JGroupsRaftProducer(this, resolvedRaftHandle, clusterName);
+    }
+
+    @Override
+    public Consumer createConsumer(Processor processor) throws Exception {
+        return new JGroupsRaftConsumer(this, processor, resolvedRaftHandle, clusterName, enableRoleChangeEvents);
+    }
+
+    @Override
+    public boolean isSingleton() {
+        return true;
+    }
+
+    @Override
+    public Exchange createExchange() {
+        Exchange exchange = super.createExchange();
+        populateJGroupsRaftHeaders(exchange);
+        return exchange;
+    }
+
+    public void populateJGroupsRaftHeaders(Exchange exchange) {
+        exchange.getIn().setHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_COMMIT_INDEX, resolvedRaftHandle.commitIndex());
+        exchange.getIn().setHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_CURRENT_TERM, resolvedRaftHandle.currentTerm());
+        exchange.getIn().setHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_IS_LEADER, resolvedRaftHandle.isLeader());
+        exchange.getIn().setHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_LAST_APPLIED, resolvedRaftHandle.lastApplied());
+        exchange.getIn().setHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_LEADER_ADDRESS, resolvedRaftHandle.leader());
+        exchange.getIn().setHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_LOG_SIZE, resolvedRaftHandle.logSize());
+        exchange.getIn().setHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_LOG_SIZE_BYTE, resolvedRaftHandle.logSizeInBytes());
+        exchange.getIn().setHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_RAFT_ID, resolvedRaftHandle.raftId());
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        LOG.info("Resolving JGroupsraft handle {}", getEndpointUri());
+        super.doStart();
+        resolvedRaftHandle = resolveHandle();
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        LOG.info("Closing JGroupsraft Channel {}", getEndpointUri());
+        if (resolvedRaftHandle != null && resolvedRaftHandle.channel() != null) {
+            resolvedRaftHandle.channel().close();
+            LOG.info("Closed JGroupsraft Channel {}", getEndpointUri());
+        }
+        LOG.info("Closing Log {}", getEndpointUri());
+        if (resolvedRaftHandle != null && resolvedRaftHandle.log() != null) {
+            resolvedRaftHandle.log().close();
+            LOG.info("Closed Log Channel {}", getEndpointUri());
+        }
+        super.doStop();
+    }
+
+    private RaftHandle resolveHandle() throws Exception {
+        if (raftHandle != null) {
+            LOG.trace("Raft Handle resolved as passed by Component: {}", raftHandle);
+            return raftHandle;
+        }
+        if (channelProperties != null && !channelProperties.isEmpty()) {
+            LOG.trace("Raft Handle created with configured channelProperties: {} and state machine: {}", channelProperties, stateMachine);
+            return new RaftHandle(new JChannel(channelProperties).name(raftId), stateMachine).raftId(raftId);
+        }
+        LOG.trace("Raft Handle created with defaults: {}, {},", JGroupsRaftConstants.DEFAULT_JGROUPSRAFT_CONFIG, stateMachine);
+        return new RaftHandle(new JChannel(JGroupsRaftConstants.DEFAULT_JGROUPSRAFT_CONFIG).name(raftId), stateMachine).raftId(raftId);
+    }
+
+    /**
+     * Connect shared RaftHandle channel, called by producer and consumer.
+     * @throws Exception
+     */
+    public void connect() throws Exception {
+        connectCount.incrementAndGet();
+        LOG.trace("Connecting JGroups-raft Channel {} with cluster name: {}, raftHandle: {} and using config: {}",
+                getEndpointUri(), clusterName, resolvedRaftHandle, channelProperties == null ? "default" : channelProperties);
+        resolvedRaftHandle.channel().connect(clusterName);
+    }
+
+    /**
+     * Disconnect shared RaftHandle channel, called by producer and consumer.
+     */
+    public void disconnect() {
+        if (connectCount.decrementAndGet() == 0) {
+            LOG.trace("Disconnecting JGroupsraft Channel {}", getEndpointUri());
+            resolvedRaftHandle.channel().disconnect();
+        }
+    }
+
+    public String getClusterName() {
+        return clusterName;
+    }
+
+    /**
+     * The name of the JGroupsraft cluster the component should connect to.
+     */
+    public void setClusterName(String clusterName) {
+        this.clusterName = clusterName;
+    }
+
+    public boolean isEnableRoleChangeEvents() {
+        return enableRoleChangeEvents;
+    }
+
+    /**
+     * If set to true, the consumer endpoint will receive roleChange event as well (not just connecting and/or using the state machine).
+     * By default it is set to false.
+     */
+    public void setEnableRoleChangeEvents(boolean enableRoleChangeEvents) {
+        this.enableRoleChangeEvents = enableRoleChangeEvents;
+    }
+
+    public String getChannelProperties() {
+        return channelProperties;
+    }
+
+    public void setChannelProperties(String channelProperties) {
+        this.channelProperties = channelProperties;
+    }
+
+    public String getRaftId() {
+        return raftId;
+    }
+
+    public void setRaftId(String raftId) {
+        this.raftId = raftId;
+    }
+
+    public RaftHandle getRaftHandle() {
+        return raftHandle;
+    }
+
+    public void setRaftHandle(RaftHandle raftHandle) {
+        this.raftHandle = raftHandle;
+    }
+
+    public StateMachine getStateMachine() {
+        return stateMachine;
+    }
+
+    public void setStateMachine(StateMachine stateMachine) {
+        this.stateMachine = stateMachine;
+    }
+
+    public RaftHandle getResolvedRaftHandle() {
+        return resolvedRaftHandle;
+    }
+}
\ No newline at end of file
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEventType.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEventType.java
new file mode 100644
index 0000000..e5a4536
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEventType.java
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft;
+
+public enum JGroupsRaftEventType {
+    LEADER,
+    FOLLOWER,
+    CANDIDATE,
+    APPLY,
+    READ_CONTENT_FROM,
+    WRITE_CONTENT_TO
+}
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftException.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftException.java
new file mode 100644
index 0000000..fe98152
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftException.java
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft;
+
+public class JGroupsRaftException extends RuntimeException {
+
+    private static final long serialVersionUID = 1L;
+
+    public JGroupsRaftException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public JGroupsRaftException(String message) {
+        super(message);
+    }
+}
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftProducer.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftProducer.java
new file mode 100644
index 0000000..b0a3d74
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/JGroupsRaftProducer.java
@@ -0,0 +1,87 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.impl.DefaultProducer;
+import org.jgroups.raft.RaftHandle;
+
+/**
+ * Call setX methods on JGroups-raft cluster RaftHandle ({@code org.jgroups.raft.RaftHandle}).
+ */
+public class JGroupsRaftProducer extends DefaultProducer {
+
+    // Producer settings
+    private final JGroupsRaftEndpoint endpoint;
+    private final RaftHandle raftHandle;
+    private final String clusterName;
+
+    // Constructor
+    public JGroupsRaftProducer(JGroupsRaftEndpoint endpoint, RaftHandle raftHandle, String clusterName) {
+        super(endpoint);
+
+        this.endpoint = endpoint;
+        this.raftHandle = raftHandle;
+        this.clusterName = clusterName;
+    }
+
+    // Life cycle callbacks
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+        endpoint.connect();
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        endpoint.disconnect();
+        super.doStop();
+    }
+
+    // Processing logic
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        //TODO: implement possibility to call CompletableFuture<byte[]> setAsync(byte[] buf, int offset, int length);
+        byte[] body = exchange.getIn().getBody(byte[].class);
+
+        Integer setOffset = exchange.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_SET_OFFSET, Integer.class);
+        Integer setLength = exchange.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_SET_LENGTH, Integer.class);
+        Long setTimeout = exchange.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_SET_TIMEOUT, Long.class);
+        TimeUnit setTimeUnit = exchange.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_SET_TIMEUNIT, TimeUnit.class);
+
+        if (body != null) {
+            byte[] result;
+            if (setOffset != null && setLength != null && setTimeout != null && setTimeUnit != null) {
+                log.debug("Calling set(byte[] {}, int {}, int {}, long {}, TimeUnit {}) method on raftHandle.", body, setOffset, setLength, setTimeout, setTimeUnit);
+                result = raftHandle.set(body, setOffset, setLength, setTimeout, setTimeUnit);
+            } else if (setOffset != null && setLength != null) {
+                log.debug("Calling set(byte[] {}, int {}, int {}) method on raftHandle.", body, setOffset, setLength);
+                result = raftHandle.set(body, setOffset, setLength);
+            } else {
+                log.debug("Calling set(byte[] {}, int {}, int {} (i.e. body.length)) method on raftHandle.", body, 0, body.length);
+                result = raftHandle.set(body, 0, body.length);
+            }
+            endpoint.populateJGroupsRaftHeaders(exchange);
+            exchange.getIn().setBody(result);
+        } else {
+            log.debug("Body is null, cannot call set method on raftHandle.");
+        }
+    }
+
+}
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/ClusterRoleChangeListener.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/ClusterRoleChangeListener.java
new file mode 100644
index 0000000..aaf4301
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/ClusterRoleChangeListener.java
@@ -0,0 +1,67 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft.cluster;
+
+import java.util.Optional;
+
+import org.apache.camel.util.ObjectHelper;
+import org.jgroups.protocols.raft.RAFT;
+import org.jgroups.protocols.raft.Role;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class ClusterRoleChangeListener implements RAFT.RoleChange {
+    private static final transient Logger LOG = LoggerFactory.getLogger(ClusterRoleChangeListener.class);
+
+    private final JGroupsRaftClusterView jgroupsRaftClusterView;
+
+    public ClusterRoleChangeListener(JGroupsRaftClusterView jgroupsRaftClusterView) {
+        ObjectHelper.notNull(jgroupsRaftClusterView, "endpoint");
+
+        this.jgroupsRaftClusterView = jgroupsRaftClusterView;
+    }
+
+    @Override
+    public void roleChanged(Role role) {
+        LOG.debug("Role received {}.", role);
+        switch (role) {
+        case Leader:
+            if (!jgroupsRaftClusterView.isMaster()) {
+                jgroupsRaftClusterView.setMaster(true);
+                jgroupsRaftClusterView.fireLeadershipChangedEvent(Optional.ofNullable(jgroupsRaftClusterView.getLocalMember()));
+            }
+            break;
+        case Follower:
+            if (jgroupsRaftClusterView.isMaster()) {
+                jgroupsRaftClusterView.setMaster(false);
+                jgroupsRaftClusterView.fireLeadershipChangedEvent(Optional.empty());
+            }
+            break;
+        case Candidate:
+            if (jgroupsRaftClusterView.isMaster()) {
+                jgroupsRaftClusterView.setMaster(false);
+                jgroupsRaftClusterView.fireLeadershipChangedEvent(Optional.empty());
+            }
+            break;
+        default:
+            LOG.error("Role {} unknown.", role);
+            throw new UnsupportedOperationException("Role " + role + " unknown.");
+        }
+    }
+}
+
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterService.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterService.java
new file mode 100644
index 0000000..604e995
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterService.java
@@ -0,0 +1,80 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft.cluster;
+
+import org.apache.camel.impl.cluster.AbstractCamelClusterService;
+import org.jgroups.raft.RaftHandle;
+
+public class JGroupsRaftClusterService extends AbstractCamelClusterService<JGroupsRaftClusterView> {
+
+    private static final String DEFAULT_JGROUPS_CONFIG = "raft.xml";
+    private static final String DEFAULT_JGROUPS_CLUSTERNAME = "jgroupsraft-master";
+
+    private String jgroupsConfig;
+    private String jgroupsClusterName;
+    private RaftHandle raftHandle;
+    private String raftId;
+
+    public JGroupsRaftClusterService() {
+        this.jgroupsConfig = DEFAULT_JGROUPS_CONFIG;
+        this.jgroupsClusterName = DEFAULT_JGROUPS_CLUSTERNAME;
+    }
+
+    public JGroupsRaftClusterService(String jgroupsConfig, String jgroupsClusterName, RaftHandle raftHandle, String raftId) {
+        this.jgroupsConfig = jgroupsConfig;
+        this.jgroupsClusterName = jgroupsClusterName;
+        this.raftHandle = raftHandle;
+        this.raftId = raftId;
+    }
+
+    @Override
+    protected JGroupsRaftClusterView createView(String namespace) throws Exception {
+        return new JGroupsRaftClusterView(this, namespace, jgroupsConfig, jgroupsClusterName, raftHandle, raftId);
+    }
+
+    public RaftHandle getRaftHandle() {
+        return raftHandle;
+    }
+
+    public void setRaftHandle(RaftHandle raftHandle) {
+        this.raftHandle = raftHandle;
+    }
+
+    public String getRaftId() {
+        return raftId;
+    }
+
+    public void setRaftId(String raftId) {
+        this.raftId = raftId;
+    }
+
+    public String getJgroupsConfig() {
+        return jgroupsConfig;
+    }
+
+    public void setJgroupsConfig(String jgroupsConfig) {
+        this.jgroupsConfig = jgroupsConfig;
+    }
+
+    public String getJgroupsClusterName() {
+        return jgroupsClusterName;
+    }
+
+    public void setJgroupsClusterName(String jgroupsClusterName) {
+        this.jgroupsClusterName = jgroupsClusterName;
+    }
+}
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterView.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterView.java
new file mode 100644
index 0000000..b7d51fe
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterView.java
@@ -0,0 +1,149 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft.cluster;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+import org.apache.camel.cluster.CamelClusterMember;
+import org.apache.camel.cluster.CamelClusterService;
+import org.apache.camel.component.jgroups.raft.JGroupsRaftConstants;
+import org.apache.camel.component.jgroups.raft.utils.NopStateMachine;
+import org.apache.camel.impl.cluster.AbstractCamelClusterView;
+import org.jgroups.JChannel;
+import org.jgroups.raft.RaftHandle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class JGroupsRaftClusterView extends AbstractCamelClusterView {
+
+    private static final transient Logger LOG = LoggerFactory.getLogger(JGroupsRaftClusterView.class);
+    private final CamelClusterMember localMember = new JGropusraftLocalMember();
+    private String jgroupsConfig;
+    private String jgroupsClusterName;
+    private RaftHandle raftHandle;
+    private String raftId;
+    private volatile boolean isMaster;
+
+    protected JGroupsRaftClusterView(CamelClusterService cluster, String namespace, String jgroupsConfig, String jgroupsClusterName, RaftHandle raftHandle, String raftId) {
+        super(cluster, namespace);
+
+        this.jgroupsConfig = jgroupsConfig;
+        this.jgroupsClusterName = jgroupsClusterName;
+        this.raftHandle = raftHandle;
+        this.raftId = raftId;
+    }
+
+    @Override
+    public Optional<CamelClusterMember> getLeader() {
+        if (isMaster) {
+            return Optional.of(localMember);
+        } else {
+            return Optional.empty();
+        }
+    }
+
+    @Override
+    public CamelClusterMember getLocalMember() {
+        return localMember;
+    }
+
+    @Override
+    public List<CamelClusterMember> getMembers() {
+        return new ArrayList<CamelClusterMember>() {{ add(localMember); }};
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        if (raftHandle == null && jgroupsConfig != null && !jgroupsConfig.isEmpty()) {
+            raftHandle = new RaftHandle(new JChannel(jgroupsConfig), new NopStateMachine()).raftId(raftId);
+        } else if (raftHandle == null) {
+            raftHandle = new RaftHandle(new JChannel(JGroupsRaftConstants.DEFAULT_JGROUPSRAFT_CONFIG), new NopStateMachine()).raftId(raftId);
+        }
+        fireLeadershipChangedEvent(Optional.empty());
+        raftHandle.addRoleListener(new ClusterRoleChangeListener(this));
+        raftHandle.channel().connect(jgroupsClusterName);
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        isMaster = false;
+        fireLeadershipChangedEvent(Optional.empty());
+        LOG.info("Disconnecting JGroupsraft Channel for JGroupsRaftClusterView with Id {}", raftId);
+        raftHandle.channel().disconnect();
+        if (raftHandle != null && raftHandle.log() != null) {
+            raftHandle.log().close();
+            LOG.info("Closed Log for JGroupsRaftClusterView with Id {}", raftId);
+        }
+    }
+
+    @Override
+    protected void doShutdown() throws Exception {
+        isMaster = false;
+        fireLeadershipChangedEvent(Optional.empty());
+        if (raftHandle != null) {
+            raftHandle.channel().close();
+            raftHandle = null;
+        }
+
+        LOG.info("Closing JGroupsraft Channel for JGroupsRaftClusterView with Id {}", raftId);
+        if (raftHandle != null && raftHandle.channel() != null) {
+            raftHandle.channel().close();
+
+            LOG.info("Closed JGroupsraft Channel Channel for JGroupsRaftClusterView with Id {}", raftId);
+        }
+        LOG.info("Closing Log for JGroupsRaftClusterView with Id {}", raftId);
+        if (raftHandle != null && raftHandle.log() != null) {
+            raftHandle.log().close();
+            LOG.info("Closed Log for JGroupsRaftClusterView with Id {}", raftId);
+        }
+        raftHandle = null;
+    }
+
+    public boolean isMaster() {
+        return isMaster;
+    }
+
+    public void setMaster(boolean master) {
+        isMaster = master;
+    }
+
+    @Override
+    protected void fireLeadershipChangedEvent(Optional<CamelClusterMember> leader) {
+        super.fireLeadershipChangedEvent(leader);
+    }
+
+    private final class JGropusraftLocalMember implements CamelClusterMember {
+
+        @Override
+        public boolean isLeader() {
+            return isMaster;
+        }
+
+        @Override
+        public boolean isLocal() {
+            return true;
+        }
+
+        @Override
+        public String getId() {
+            return getClusterService().getId();
+        }
+    }
+}
diff --git a/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/utils/NopStateMachine.java b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/utils/NopStateMachine.java
new file mode 100644
index 0000000..9fc9c9e
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/java/org/apache/camel/component/jgroups/raft/utils/NopStateMachine.java
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft.utils;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+
+import org.jgroups.protocols.raft.StateMachine;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Implementation of JGroups-raft state machine ({@code org.jgroups.protocols.raft.StateMachine}) that dose nothing.
+ */
+public class NopStateMachine implements StateMachine {
+    private static final transient Logger LOG = LoggerFactory.getLogger(NopStateMachine.class);
+
+    @Override
+    public byte[] apply(byte[] bytes, int offset, int length) throws Exception {
+        LOG.trace("Called StateMachine.apply(byte[] {}, int {}, int {}) on {}", bytes, offset, length, this);
+        return new byte[0];
+    }
+
+    @Override
+    public void readContentFrom(DataInput dataInput) throws Exception {
+        LOG.trace("Called StateMachine.readContentFrom(DataInput {}) on {}", dataInput, this);
+    }
+
+    @Override
+    public void writeContentTo(DataOutput dataOutput) throws Exception {
+        LOG.trace("Called StateMachine.readContentFrom(DataOutput {}) on {}", dataOutput, this);
+    }
+}
diff --git a/components/camel-jgroups-raft/src/main/resources/LICENSE.txt b/components/camel-jgroups-raft/src/main/resources/LICENSE.txt
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/resources/LICENSE.txt
@@ -0,0 +1,203 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
diff --git a/components/camel-jgroups-raft/src/main/resources/META-INF/services/org/apache/camel/component/jgroups-raft b/components/camel-jgroups-raft/src/main/resources/META-INF/services/org/apache/camel/component/jgroups-raft
new file mode 100644
index 0000000..14ba9e2
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/resources/META-INF/services/org/apache/camel/component/jgroups-raft
@@ -0,0 +1,18 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ------------------------------------------------------------------------
+
+class=org.apache.camel.component.jgroups.raft.JGroupsRaftComponent
\ No newline at end of file
diff --git a/components/camel-jgroups-raft/src/main/resources/NOTICE.txt b/components/camel-jgroups-raft/src/main/resources/NOTICE.txt
new file mode 100644
index 0000000..2e215bf
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/resources/NOTICE.txt
@@ -0,0 +1,11 @@
+   =========================================================================
+   ==  NOTICE file corresponding to the section 4 d of                    ==
+   ==  the Apache License, Version 2.0,                                   ==
+   ==  in this case for the Apache Camel distribution.                    ==
+   =========================================================================
+
+   This product includes software developed by
+   The Apache Software Foundation (http://www.apache.org/).
+
+   Please read the different LICENSE files present in the licenses directory of
+   this distribution.
diff --git a/components/camel-jgroups-raft/src/main/resources/raft.xml b/components/camel-jgroups-raft/src/main/resources/raft.xml
new file mode 100644
index 0000000..5446d0a
--- /dev/null
+++ b/components/camel-jgroups-raft/src/main/resources/raft.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<config xmlns="urn:org:jgroups"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
+    <UDP mcast_addr="228.5.5.5" mcast_port="${jgroups.udp.mcast_port:45588}"/>
+    <PING />
+    <MERGE3 />
+    <FD_SOCK/>
+    <FD_ALL/>
+    <VERIFY_SUSPECT timeout="1500"  />
+    <pbcast.NAKACK2 xmit_interval="500"/>
+    <UNICAST3 xmit_interval="500"/>
+    <pbcast.STABLE desired_avg_gossip="50000" max_bytes="4M"/>
+    <raft.NO_DUPES/>
+    <pbcast.GMS print_local_addr="true" join_timeout="2000"/>
+    <UFC max_credits="2M" min_threshold="0.4"/>
+    <MFC max_credits="2M" min_threshold="0.4"/>
+    <FRAG2 frag_size="60K" />
+    <raft.ELECTION election_min_interval="100" election_max_interval="500"/>
+    <raft.RAFT members="A" raft_id="${raft_id:undefined}"/>
+    <raft.REDIRECT/>
+</config>
\ No newline at end of file
diff --git a/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftAbstractTest.java b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftAbstractTest.java
new file mode 100644
index 0000000..fa01b03
--- /dev/null
+++ b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftAbstractTest.java
@@ -0,0 +1,49 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.jgroups.Address;
+import org.jgroups.raft.RaftHandle;
+
+public abstract class JGroupsRaftAbstractTest extends CamelTestSupport {
+    protected void checkHeaders(Exchange exchange) {
+        assertNotNull(exchange.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_COMMIT_INDEX, int.class));
+        assertNotNull(exchange.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_CURRENT_TERM, int.class));
+        assertNotNull(exchange.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_IS_LEADER, boolean.class));
+        assertNotNull(exchange.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_LAST_APPLIED, int.class));
+        assertNotNull(exchange.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_LEADER_ADDRESS, Address.class));
+        assertNotNull(exchange.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_LOG_SIZE, int.class));
+        assertNotNull(exchange.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_LOG_SIZE_BYTE, int.class));
+        assertNotNull(exchange.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_RAFT_ID, String.class));
+    }
+
+    protected void waitForLeader(int attempts, RaftHandle rh, RaftHandle rh2, RaftHandle rh3) throws InterruptedException {
+        boolean thereIsLeader = rh.isLeader() || rh2.isLeader() || rh3.isLeader();
+        while (!thereIsLeader && attempts > 0) {
+            thereIsLeader = rh.isLeader() || rh2.isLeader() || rh3.isLeader();
+            TimeUnit.SECONDS.sleep(1);
+            attempts--;
+        }
+        if (attempts <= 0) {
+            throw new RuntimeException("No leader in time!");
+        }
+    }
+}
diff --git a/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponentConfiguredTest.java b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponentConfiguredTest.java
new file mode 100644
index 0000000..273ee12
--- /dev/null
+++ b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponentConfiguredTest.java
@@ -0,0 +1,74 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.jgroups.raft.utils.NopStateMachine;
+import org.apache.camel.impl.JndiRegistry;
+import org.apache.camel.impl.SimpleRegistry;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.jgroups.JChannel;
+import org.jgroups.raft.RaftHandle;
+import org.junit.After;
+import org.junit.Test;
+
+public class JGroupsRaftComponentConfiguredTest extends CamelTestSupport {
+
+    static final String CLUSTER_NAME = "JGroupsRaftComponentConfiguredTest";
+    static final String CONFIGURED_ENDPOINT_URI = String.format("my-config-jgroupsraft:%s?raftId=B&channelProperties=raftB.xml", CLUSTER_NAME);
+
+    static final String CLUSTER_NAME2 = "JGroupsraftComponentConfiguredTest2";
+    static final String CONFIGURED_ENDPOINT_URI2 = String.format("my-config-jgroupsraft2:%s?raftId=C&channelProperties=raftXXX.xml", CLUSTER_NAME2);
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                JGroupsRaftComponent configuredComponent = new JGroupsRaftComponent();
+                context().addComponent("my-config-jgroupsraft", configuredComponent);
+
+                JChannel ch = new JChannel("raftC.xml");
+                RaftHandle handle = new RaftHandle(ch, new NopStateMachine()).raftId("C");
+                JGroupsRaftComponent configuredComponent2 = new JGroupsRaftComponent();
+                configuredComponent2.setRaftHandle(handle);
+                context().addComponent("my-config-jgroupsraft2", configuredComponent2);
+
+                from(CONFIGURED_ENDPOINT_URI).to("mock:configured");
+
+                from(CONFIGURED_ENDPOINT_URI2).to("mock:configured2");
+            }
+        };
+    }
+
+    @Test
+    public void shouldUseChannelPropertiesAndRaftHandle() {
+        JGroupsRaftEndpoint endpoint = getMandatoryEndpoint(CONFIGURED_ENDPOINT_URI, JGroupsRaftEndpoint.class);
+        JGroupsRaftComponent component = (JGroupsRaftComponent) endpoint.getComponent();
+
+        JGroupsRaftEndpoint endpoint2 = getMandatoryEndpoint(CONFIGURED_ENDPOINT_URI2, JGroupsRaftEndpoint.class);
+        JGroupsRaftComponent component2 = (JGroupsRaftComponent) endpoint2.getComponent();
+
+        assertNotNull(component);
+        assertNotNull(endpoint.getResolvedRaftHandle());
+        assertEquals("raftB.xml", endpoint.getChannelProperties());
+
+        assertNotNull(component2);
+        assertEquals(endpoint2.getRaftHandle(), endpoint2.getResolvedRaftHandle());
+    }
+
+}
diff --git a/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponentDefaultTest.java b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponentDefaultTest.java
new file mode 100644
index 0000000..e09eda9
--- /dev/null
+++ b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftComponentDefaultTest.java
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.jgroups.raft.utils.NopStateMachine;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.After;
+import org.junit.Test;
+
+public class JGroupsRaftComponentDefaultTest extends CamelTestSupport {
+
+    static final String CLUSTER_NAME = "JGroupsRaftComponentDefaultTest";
+    static final String CONFIGURED_ENDPOINT_URI = String.format("my-default-jgroupsraft:%s?raftId=A", CLUSTER_NAME);
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                JGroupsRaftComponent defaultComponent = new JGroupsRaftComponent();
+                context().addComponent("my-default-jgroupsraft", defaultComponent);
+
+                from("my-default-jgroupsraft:" + CLUSTER_NAME + "?raftId=A").to("mock:default");
+            }
+        };
+    }
+
+    @Test
+    public void shouldCreateHandleWithDefaults() {
+        JGroupsRaftEndpoint endpoint = getMandatoryEndpoint(CONFIGURED_ENDPOINT_URI, JGroupsRaftEndpoint.class);
+        JGroupsRaftComponent component = (JGroupsRaftComponent) endpoint.getComponent();
+
+        assertNotNull(component);
+        assertNotNull(endpoint.getResolvedRaftHandle());
+        assertNotNull(endpoint.getResolvedRaftHandle().channel().getProtocolStack().findProtocol("RAFT"));
+        assertTrue(component.getStateMachine() instanceof NopStateMachine);
+        assertTrue(endpoint.getStateMachine() instanceof NopStateMachine);
+        assertNull(component.getChannelProperties());
+        assertNull(endpoint.getChannelProperties());
+        assertEquals("A", endpoint.getRaftId());
+        assertEquals("A", endpoint.getRaftId());
+    }
+
+}
diff --git a/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConsumerTest.java b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConsumerTest.java
new file mode 100644
index 0000000..02898a5
--- /dev/null
+++ b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftConsumerTest.java
@@ -0,0 +1,90 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class JGroupsRaftConsumerTest extends JGroupsRaftAbstractTest {
+    private static final String CLUSTER_NAME = "JGroupsRaftConsumerTest";
+    private static final String CONFIGURED_ENDPOINT_URI = "jgroups-raft:" + CLUSTER_NAME + "?raftId=A&channelProperties=raftABC.xml&enableRoleChangeEvents=true";
+    private static final String CONFIGURED_ENDPOINT_URI2 = "jgroups-raft:" + CLUSTER_NAME + "?raftId=B&channelProperties=raftABC.xml&enableRoleChangeEvents=true";
+    private static final String CONFIGURED_ENDPOINT_URI3 = "jgroups-raft:" + CLUSTER_NAME + "?raftId=C&channelProperties=raftABC.xml&enableRoleChangeEvents=true";
+
+    private static final Logger LOG = LoggerFactory.getLogger(JGroupsRaftConsumerTest.class);
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from(CONFIGURED_ENDPOINT_URI).to("mock:out");
+                from(CONFIGURED_ENDPOINT_URI2).to("mock:out2");
+                from(CONFIGURED_ENDPOINT_URI3).to("mock:out3");
+            }
+        };
+    }
+
+    @Test
+    public void shouldReceiveChangeRoleEvents() throws Exception {
+        JGroupsRaftEndpoint endpoint = getMandatoryEndpoint(CONFIGURED_ENDPOINT_URI, JGroupsRaftEndpoint.class);
+        JGroupsRaftEndpoint endpoint2 = getMandatoryEndpoint(CONFIGURED_ENDPOINT_URI2, JGroupsRaftEndpoint.class);
+        JGroupsRaftEndpoint endpoint3 = getMandatoryEndpoint(CONFIGURED_ENDPOINT_URI3, JGroupsRaftEndpoint.class);
+
+        waitForLeader(5, endpoint.getResolvedRaftHandle(), endpoint2.getResolvedRaftHandle(), endpoint3.getResolvedRaftHandle());
+
+        MockEndpoint mock = getMockEndpoint("mock:out");
+        MockEndpoint mock2 = getMockEndpoint("mock:out2");
+        MockEndpoint mock3 = getMockEndpoint("mock:out3");
+
+        Exchange leaderEventExchange = null;
+
+        for (Exchange exc : mock.getReceivedExchanges()) {
+            LOG.info("mock" + exc.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_EVENT_TYPE, JGroupsRaftEventType.class));
+            if (leaderEventExchange != null) {
+                break;
+            }
+            if (JGroupsRaftEventType.LEADER.equals(exc.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_EVENT_TYPE, JGroupsRaftEventType.class))) {
+                leaderEventExchange = exc;
+            }
+        }
+        for (Exchange exc : mock2.getReceivedExchanges()) {
+            LOG.info("mock2" + exc.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_EVENT_TYPE, JGroupsRaftEventType.class));
+            if (leaderEventExchange != null) {
+                break;
+            }
+            if (JGroupsRaftEventType.LEADER.equals(exc.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_EVENT_TYPE, JGroupsRaftEventType.class))) {
+                leaderEventExchange = exc;
+            }
+        }
+        for (Exchange exc : mock3.getReceivedExchanges()) {
+            LOG.info("mock3" + exc.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_EVENT_TYPE, JGroupsRaftEventType.class));
+            if (leaderEventExchange != null) {
+                break;
+            }
+            if (JGroupsRaftEventType.LEADER.equals(exc.getIn().getHeader(JGroupsRaftConstants.HEADER_JGROUPSRAFT_EVENT_TYPE, JGroupsRaftEventType.class))) {
+                leaderEventExchange = exc;
+            }
+        }
+
+        checkHeaders(leaderEventExchange);
+    }
+}
\ No newline at end of file
diff --git a/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEndpointTest.java b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEndpointTest.java
new file mode 100644
index 0000000..3272dfb
--- /dev/null
+++ b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftEndpointTest.java
@@ -0,0 +1,94 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.jgroups.raft.utils.NopStateMachine;
+import org.apache.camel.impl.JndiRegistry;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.jgroups.JChannel;
+import org.jgroups.protocols.raft.StateMachine;
+import org.jgroups.raft.RaftHandle;
+import org.junit.Test;
+
+public class JGroupsRaftEndpointTest extends CamelTestSupport {
+
+    static final String CLUSTER_NAME = "JGroupsRaftEndpointTest";
+    static final String CONFIGURED_ENDPOINT_URI = "jgroups-raft:" + CLUSTER_NAME + "?raftId=A";
+    static final String CLUSTER_NAME1 = "JGroupsraftEndpointTest1";
+    static final String CONFIGURED_ENDPOINT_URI1 = "jgroups-raft:" + CLUSTER_NAME1 + "?raftHandle=#rh";
+    static final String CLUSTER_NAME2 = "JGroupsraftEndpointTest2";
+    static final String CONFIGURED_ENDPOINT_URI2 = "jgroups-raft:" + CLUSTER_NAME2 + "?stateMachine=#sm&raftId=C&channelProperties=raftC.xml";
+
+    StateMachine sm = new StateMachine() {
+        @Override
+        public byte[] apply(byte[] bytes, int i, int i1) throws Exception {
+            return new byte[0];
+        }
+
+        @Override
+        public void readContentFrom(DataInput dataInput) throws Exception {
+
+        }
+
+        @Override
+        public void writeContentTo(DataOutput dataOutput) throws Exception {
+
+        }
+    };
+
+    @Override
+    protected JndiRegistry createRegistry() throws Exception {
+        JChannel ch = new JChannel("raftB.xml").name("B");
+        RaftHandle handle = new RaftHandle(ch, new NopStateMachine()).raftId("B");
+        JndiRegistry registry = new JndiRegistry(createJndiContext());
+        registry.bind("rh", handle);
+        registry.bind("sm", sm);
+        return registry;
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from(CONFIGURED_ENDPOINT_URI).to("mock:test");
+                from(CONFIGURED_ENDPOINT_URI1).to("mock:test1");
+                from(CONFIGURED_ENDPOINT_URI2).to("mock:test2");
+            }
+        };
+    }
+
+    @Test
+    public void shouldSetClusterNameAndResolveRaftHandle() throws Exception {
+        JGroupsRaftEndpoint endpoint = getMandatoryEndpoint(CONFIGURED_ENDPOINT_URI, JGroupsRaftEndpoint.class);
+
+        assertEquals(CLUSTER_NAME, endpoint.getClusterName());
+
+        JGroupsRaftEndpoint endpoint1 = getMandatoryEndpoint(CONFIGURED_ENDPOINT_URI1, JGroupsRaftEndpoint.class);
+
+        assertNotNull(endpoint1.getRaftHandle());
+        assertEquals(endpoint1.getRaftHandle(), endpoint1.getResolvedRaftHandle());
+
+        JGroupsRaftEndpoint endpoint2 = getMandatoryEndpoint(CONFIGURED_ENDPOINT_URI2, JGroupsRaftEndpoint.class);
+
+        assertEquals(sm, endpoint2.getStateMachine());
+    }
+}
diff --git a/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftProducerTest.java b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftProducerTest.java
new file mode 100644
index 0000000..e1b3133
--- /dev/null
+++ b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/JGroupsRaftProducerTest.java
@@ -0,0 +1,66 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class JGroupsRaftProducerTest extends JGroupsRaftAbstractTest {
+    private static final String CLUSTER_NAME = "JGroupsRaftProducerTest";
+    private static final String CONFIGURED_ENDPOINT_URI = "jgroups-raft:" + CLUSTER_NAME + "?raftId=A&channelProperties=raftABC.xml";
+    private static final String CONFIGURED_ENDPOINT_URI2 = "jgroups-raft:" + CLUSTER_NAME + "?raftId=B&channelProperties=raftABC.xml";
+    private static final String CONFIGURED_ENDPOINT_URI3 = "jgroups-raft:" + CLUSTER_NAME + "?raftId=C&channelProperties=raftABC.xml";
+    private static final String MESSAGE = "MESSAGE";
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("direct:start").to(CONFIGURED_ENDPOINT_URI);
+                from("direct:start2").to(CONFIGURED_ENDPOINT_URI2);
+                from("direct:start3").to(CONFIGURED_ENDPOINT_URI3);
+            }
+        };
+    }
+
+    @Test
+    public void shouldSendBody() throws Exception {
+        JGroupsRaftEndpoint endpoint = getMandatoryEndpoint(CONFIGURED_ENDPOINT_URI, JGroupsRaftEndpoint.class);
+        JGroupsRaftEndpoint endpoint2 = getMandatoryEndpoint(CONFIGURED_ENDPOINT_URI2, JGroupsRaftEndpoint.class);
+        JGroupsRaftEndpoint endpoint3 = getMandatoryEndpoint(CONFIGURED_ENDPOINT_URI3, JGroupsRaftEndpoint.class);
+
+        waitForLeader(5, endpoint.getResolvedRaftHandle(), endpoint2.getResolvedRaftHandle(), endpoint3.getResolvedRaftHandle());
+
+        Processor processor = exchange -> exchange.getIn().setBody(MESSAGE.getBytes());
+
+        Exchange res = template.request("direct:start", processor);
+        Exchange res2 = template.request("direct:start2", processor);
+        Exchange res3 = template.request("direct:start3", processor);
+
+        assertNotNull(res.getIn().getBody());
+        checkHeaders(res);
+        assertNotNull(res2.getIn().getBody());
+        checkHeaders(res2);
+        assertNotNull(res3.getIn().getBody());
+        checkHeaders(res3);
+    }
+}
diff --git a/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterAbastractTest.java b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterAbastractTest.java
new file mode 100644
index 0000000..467686c
--- /dev/null
+++ b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusterAbastractTest.java
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft.cluster;
+
+import java.util.concurrent.TimeUnit;
+
+import org.jgroups.raft.RaftHandle;
+
+public abstract class JGroupsRaftClusterAbastractTest {
+    protected void waitForLeader(int attempts, RaftHandle rh, RaftHandle rh2, RaftHandle rh3) throws InterruptedException {
+        boolean thereIsLeader = rh.isLeader() || rh2.isLeader() || rh3.isLeader();
+        while (!thereIsLeader && attempts > 0) {
+            thereIsLeader = rh.isLeader() || rh2.isLeader() || rh3.isLeader();
+            TimeUnit.SECONDS.sleep(1);
+            attempts--;
+        }
+        if (attempts <= 0) {
+            throw new RuntimeException("No leader in time!");
+        }
+    }
+}
diff --git a/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusteredRoutePolicyTest.java b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusteredRoutePolicyTest.java
new file mode 100644
index 0000000..cc62187
--- /dev/null
+++ b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusteredRoutePolicyTest.java
@@ -0,0 +1,118 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft.cluster;
+
+import java.util.ArrayList;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ServiceStatus;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.jgroups.raft.utils.NopStateMachine;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.impl.cluster.ClusteredRoutePolicy;
+import org.jgroups.JChannel;
+import org.jgroups.raft.RaftHandle;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.Assert.assertEquals;
+
+public class JGroupsRaftClusteredRoutePolicyTest extends JGroupsRaftClusterAbastractTest {
+    private static final Logger LOG = LoggerFactory.getLogger(JGroupsRaftClusteredRoutePolicyTest.class);
+
+    private ArrayList<CamelContext> lcc = new ArrayList<>();
+    private ArrayList<String> rn = new ArrayList<>();
+
+    @Test
+    public void test() throws Exception {
+        JChannel chA = new JChannel("raftABC.xml").name("A");
+        RaftHandle handleA = new RaftHandle(chA, new NopStateMachine()).raftId("A");
+        CamelContext contextA = createContext("A", handleA);
+
+        JChannel chB = new JChannel("raftABC.xml").name("B");
+        RaftHandle handleB = new RaftHandle(chB, new NopStateMachine()).raftId("B");
+        CamelContext contextB = createContext("B", handleB);
+
+        JChannel chC = new JChannel("raftABC.xml").name("C");
+        RaftHandle handleC = new RaftHandle(chC, new NopStateMachine()).raftId("C");
+        CamelContext contextC = createContext("C", handleC);
+
+        lcc.add(contextA);
+        rn.add("route-A");
+        lcc.add(contextB);
+        rn.add("route-B");
+        lcc.add(contextC);
+        rn.add("route-C");
+
+        contextA.start();
+        contextB.start();
+        contextC.start();
+        waitForLeader(50, handleA, handleB, handleC);
+        assertEquals(1, countActiveFromEndpoints(lcc, rn));
+
+        contextA.stop();
+        waitForLeader(50, handleA, handleB, handleC);
+        assertEquals(1, countActiveFromEndpoints(lcc, rn));
+
+        contextB.stop();
+        chA = new JChannel("raftABC.xml").name("A");
+        handleA = new RaftHandle(chA, new NopStateMachine()).raftId("A");
+        contextA = createContext("A", handleA);
+        contextA.start();
+        waitForLeader(50, handleA, handleB, handleC);
+        assertEquals(1, countActiveFromEndpoints(lcc, rn));
+    }
+
+    private CamelContext createContext(String id, RaftHandle rh) throws Exception {
+        JGroupsRaftClusterService service = new JGroupsRaftClusterService();
+        service.setId(id);
+        service.setRaftId(id);
+        service.setRaftHandle(rh);
+        service.setJgroupsClusterName("JGroupsRaftClusteredRoutePolicyTest");
+
+        DefaultCamelContext context = new DefaultCamelContext();
+        context.disableJMX();
+        context.setName("context-" + id);
+        context.addService(service);
+        context.addRoutes(new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("timer:master?delay=1s&period=1s")
+                        .routeId("route-" + id)
+                        .routePolicy(ClusteredRoutePolicy.forNamespace("jgr"))
+                        .log("From ${routeId}");
+            }
+        });
+
+        return context;
+    }
+
+    private int countActiveFromEndpoints(ArrayList<CamelContext> lcc, ArrayList<String> rn) throws NoSuchFieldException, IllegalAccessException {
+        int result = 0;
+        if (lcc.size() != rn.size()) {
+            throw new UnsupportedOperationException("CamelContext list and Route ids list must have the same number of elements!");
+        }
+        for (int i = 0; i < lcc.size(); i++) {
+            ServiceStatus status = lcc.get(i).getRouteStatus(rn.get(i));
+            if (ServiceStatus.Starting.equals(status) || ServiceStatus.Started.equals(status)) {
+                result++;
+            }
+        }
+        return result;
+    }
+}
diff --git a/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftMasterTest.java b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftMasterTest.java
new file mode 100644
index 0000000..f73e8cf
--- /dev/null
+++ b/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftMasterTest.java
@@ -0,0 +1,127 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft.cluster;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Route;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.jgroups.raft.utils.NopStateMachine;
+import org.apache.camel.component.master.MasterConsumer;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.jgroups.JChannel;
+import org.jgroups.raft.RaftHandle;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.Assert.assertEquals;
+
+public class JGroupsRaftMasterTest extends JGroupsRaftClusterAbastractTest {
+    private static final Logger LOG = LoggerFactory.getLogger(JGroupsRaftMasterTest.class);
+
+    private ArrayList<CamelContext> lcc = new ArrayList<>();
+    private ArrayList<String> rn = new ArrayList<>();
+
+    @Test
+    public void test() throws Exception {
+        JChannel chA = new JChannel("raftABC.xml").name("A");
+        RaftHandle handleA = new RaftHandle(chA, new NopStateMachine()).raftId("A");
+        CamelContext contextA = createContext("A", handleA);
+
+        JChannel chB = new JChannel("raftABC.xml").name("B");
+        RaftHandle handleB = new RaftHandle(chB, new NopStateMachine()).raftId("B");
+        CamelContext contextB = createContext("B", handleB);
+
+        JChannel chC = new JChannel("raftABC.xml").name("C");
+        RaftHandle handleC = new RaftHandle(chC, new NopStateMachine()).raftId("C");
+        CamelContext contextC = createContext("C", handleC);
+
+        lcc.add(contextA);
+        rn.add("route-A");
+        lcc.add(contextB);
+        rn.add("route-B");
+        lcc.add(contextC);
+        rn.add("route-C");
+
+        contextA.start();
+        contextB.start();
+        contextC.start();
+        waitForLeader(50, handleA, handleB, handleC);
+        assertEquals(1, countActiveFromEndpoints(lcc, rn));
+
+        contextA.stop();
+        waitForLeader(50, handleA, handleB, handleC);
+        assertEquals(1, countActiveFromEndpoints(lcc, rn));
+
+        contextB.stop();
+        JGroupsRaftClusterService service = new JGroupsRaftClusterService();
+        service.setId("A");
+        service.setRaftId("A");
+        service.setRaftHandle(handleA);
+        service.setJgroupsClusterName("JGroupsRaftMasterTest");
+        contextA.addService(service);
+        contextA.start();
+        waitForLeader(50, handleA, handleB, handleC);
+        assertEquals(1, countActiveFromEndpoints(lcc, rn));
+    }
+
+    private CamelContext createContext(String id, RaftHandle rh) throws Exception {
+        JGroupsRaftClusterService service = new JGroupsRaftClusterService();
+        service.setId(id);
+        service.setRaftId(id);
+        service.setRaftHandle(rh);
+        service.setJgroupsClusterName("JGroupsRaftMasterTest");
+
+        DefaultCamelContext context = new DefaultCamelContext();
+        context.disableJMX();
+        context.setName("context-" + id);
+        context.addService(service);
+        context.addRoutes(new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("master:jgr:timer:master?delay=1s&period=1s")
+                        .routeId("route-" + id)
+                        .log("From ${routeId}");
+            }
+        });
+
+        return context;
+    }
+
+    private int countActiveFromEndpoints(ArrayList<CamelContext> lcc, ArrayList<String> rn) throws NoSuchFieldException, IllegalAccessException {
+        int result = 0;
+        if (lcc.size() != rn.size()) {
+            throw new UnsupportedOperationException("CamelContext list and Route ids list must have the same number of elements!");
+        }
+        for (int i = 0; i < lcc.size(); i++) {
+            Route route = lcc.get(i).getRoute(rn.get(i));
+            if (route != null) {
+                MasterConsumer mc = (MasterConsumer) route.getConsumer();
+                Field delegatedConsumer = mc.getClass().getDeclaredField("delegatedConsumer");
+                delegatedConsumer.setAccessible(true);
+                if (delegatedConsumer.get(mc) != null) {
+                    result++;
+                }
+            }
+        }
+        return result;
+    }
+
+}
diff --git a/components/camel-jgroups-raft/src/test/resources/log4j2.properties b/components/camel-jgroups-raft/src/test/resources/log4j2.properties
new file mode 100644
index 0000000..8f85ee1
--- /dev/null
+++ b/components/camel-jgroups-raft/src/test/resources/log4j2.properties
@@ -0,0 +1,36 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-jgroupsraft-test.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+appender.stdout.type = Console
+appender.stdout.name = stdout
+appender.stdout.layout.type = PatternLayout
+appender.stdout.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+rootLogger.level = INFO
+rootLogger.appenderRef.file.ref = stdout
+
+loggers = mine,yours
+
+logger.mine.name = org.apache.camel.component.jgroups.raft
+logger.mine.level = TRACE
+
+logger.yours.name = org.apache.camel.component.master
+logger.yours.level = TRACE
\ No newline at end of file
diff --git a/components/camel-jgroups-raft/src/test/resources/raft.xml b/components/camel-jgroups-raft/src/test/resources/raft.xml
new file mode 100644
index 0000000..fd8b65f
--- /dev/null
+++ b/components/camel-jgroups-raft/src/test/resources/raft.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<config xmlns="urn:org:jgroups"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
+    <SHARED_LOOPBACK
+            max_bundle_size="64K"
+            enable_diagnostics="true"
+            thread_naming_pattern="cl"
+
+            thread_pool.enabled="true"
+            thread_pool.min_threads="2"
+            thread_pool.max_threads="8"
+            thread_pool.keep_alive_time="5000"/>
+
+    <SHARED_LOOPBACK_PING />
+    <MERGE3 />
+    <FD_SOCK/>
+    <FD_ALL/>
+    <VERIFY_SUSPECT timeout="1500"  />
+    <pbcast.NAKACK2 xmit_interval="500"/>
+    <UNICAST3 xmit_interval="500"/>
+    <pbcast.STABLE desired_avg_gossip="50000" max_bytes="4M"/>
+    <raft.NO_DUPES/>
+    <pbcast.GMS print_local_addr="true" join_timeout="2000"/>
+    <UFC max_credits="2M" min_threshold="0.4"/>
+    <MFC max_credits="2M" min_threshold="0.4"/>
+    <FRAG2 frag_size="60K" />
+    <raft.ELECTION election_min_interval="100" election_max_interval="500"/>
+    <raft.RAFT members="A" raft_id="${raft_id:undefined}" log_class="org.jgroups.protocols.raft.InMemoryLog"/>
+    <raft.REDIRECT/>
+</config>
\ No newline at end of file
diff --git a/components/camel-jgroups-raft/src/test/resources/raftABC.xml b/components/camel-jgroups-raft/src/test/resources/raftABC.xml
new file mode 100644
index 0000000..53d5a9c
--- /dev/null
+++ b/components/camel-jgroups-raft/src/test/resources/raftABC.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<config xmlns="urn:org:jgroups"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
+    <SHARED_LOOPBACK
+            max_bundle_size="64K"
+            enable_diagnostics="true"
+            thread_naming_pattern="cl"
+
+            thread_pool.enabled="true"
+            thread_pool.min_threads="2"
+            thread_pool.max_threads="8"
+            thread_pool.keep_alive_time="5000"/>
+
+    <SHARED_LOOPBACK_PING />
+    <MERGE3 />
+    <FD_SOCK/>
+    <FD_ALL/>
+    <VERIFY_SUSPECT timeout="1500"  />
+    <pbcast.NAKACK2 xmit_interval="500"/>
+    <UNICAST3 xmit_interval="500"/>
+    <pbcast.STABLE desired_avg_gossip="50000" max_bytes="4M"/>
+    <raft.NO_DUPES/>
+    <pbcast.GMS print_local_addr="true" join_timeout="2000"/>
+    <UFC max_credits="2M" min_threshold="0.4"/>
+    <MFC max_credits="2M" min_threshold="0.4"/>
+    <FRAG2 frag_size="60K" />
+    <raft.ELECTION election_min_interval="100" election_max_interval="500"/>
+    <raft.RAFT members="A,B,C" raft_id="${raft_id:undefined}" log_class="org.jgroups.protocols.raft.InMemoryLog"/>
+    <raft.REDIRECT/>
+</config>
\ No newline at end of file
diff --git a/components/camel-jgroups-raft/src/test/resources/raftB.xml b/components/camel-jgroups-raft/src/test/resources/raftB.xml
new file mode 100644
index 0000000..3c3e84e
--- /dev/null
+++ b/components/camel-jgroups-raft/src/test/resources/raftB.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<config xmlns="urn:org:jgroups"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
+    <SHARED_LOOPBACK
+            max_bundle_size="64K"
+            enable_diagnostics="true"
+            thread_naming_pattern="cl"
+
+            thread_pool.enabled="true"
+            thread_pool.min_threads="2"
+            thread_pool.max_threads="8"
+            thread_pool.keep_alive_time="5000"/>
+
+    <SHARED_LOOPBACK_PING />
+    <MERGE3 />
+    <FD_SOCK/>
+    <FD_ALL/>
+    <VERIFY_SUSPECT timeout="1500"  />
+    <pbcast.NAKACK2 xmit_interval="500"/>
+    <UNICAST3 xmit_interval="500"/>
+    <pbcast.STABLE desired_avg_gossip="50000" max_bytes="4M"/>
+    <raft.NO_DUPES/>
+    <pbcast.GMS print_local_addr="true" join_timeout="2000"/>
+    <UFC max_credits="2M" min_threshold="0.4"/>
+    <MFC max_credits="2M" min_threshold="0.4"/>
+    <FRAG2 frag_size="60K" />
+    <raft.ELECTION election_min_interval="100" election_max_interval="500"/>
+    <raft.RAFT members="B" raft_id="${raft_id:undefined}" log_class="org.jgroups.protocols.raft.InMemoryLog"/>
+    <raft.REDIRECT/>
+</config>
\ No newline at end of file
diff --git a/components/camel-jgroups-raft/src/test/resources/raftC.xml b/components/camel-jgroups-raft/src/test/resources/raftC.xml
new file mode 100644
index 0000000..a0ff3a9
--- /dev/null
+++ b/components/camel-jgroups-raft/src/test/resources/raftC.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<config xmlns="urn:org:jgroups"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
+    <SHARED_LOOPBACK
+            max_bundle_size="64K"
+            enable_diagnostics="true"
+            thread_naming_pattern="cl"
+
+            thread_pool.enabled="true"
+            thread_pool.min_threads="2"
+            thread_pool.max_threads="8"
+            thread_pool.keep_alive_time="5000"/>
+
+    <SHARED_LOOPBACK_PING />
+    <MERGE3 />
+    <FD_SOCK/>
+    <FD_ALL/>
+    <VERIFY_SUSPECT timeout="1500"  />
+    <pbcast.NAKACK2 xmit_interval="500"/>
+    <UNICAST3 xmit_interval="500"/>
+    <pbcast.STABLE desired_avg_gossip="50000" max_bytes="4M"/>
+    <raft.NO_DUPES/>
+    <pbcast.GMS print_local_addr="true" join_timeout="2000"/>
+    <UFC max_credits="2M" min_threshold="0.4"/>
+    <MFC max_credits="2M" min_threshold="0.4"/>
+    <FRAG2 frag_size="60K" />
+    <raft.ELECTION election_min_interval="100" election_max_interval="500"/>
+    <raft.RAFT members="C" raft_id="${raft_id:undefined}" log_class="org.jgroups.protocols.raft.InMemoryLog"/>
+    <raft.REDIRECT/>
+</config>
\ No newline at end of file
diff --git a/components/pom.xml b/components/pom.xml
index f6233f3..8fcc6b2 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -167,6 +167,7 @@
     <module>camel-jcr</module>
     <module>camel-jdbc</module>
     <module>camel-jgroups</module>
+    <module>camel-jgroups-raft</module>
     <!-- camel-jibx doesn't work under JDK8, but may be build without tests -->
     <module>camel-jibx</module>
     <module>camel-jing</module>
diff --git a/components/readme.adoc b/components/readme.adoc
index 72d5420..efbb3b5 100644
--- a/components/readme.adoc
+++ b/components/readme.adoc
@@ -236,6 +236,15 @@ Number of Components: 287 in 190 JAR artifacts (1 deprecated)
 | link:camel-elasticsearch-rest/src/main/docs/elasticsearch-rest-component.adoc[Elastichsearch Rest] (camel-elasticsearch-rest) +
 `elasticsearch-rest:clusterName` | 2.21 | The elasticsearch component is used for interfacing with ElasticSearch server using REST API.
 
+| link:camel-elasticsearch5-rest/src/main/docs/elasticsearch5-rest-component.adoc[Elastichsearch5 Rest] (camel-elasticsearch5-rest) +
+`elasticsearch5-rest:clusterName` | 2.21 | The elasticsearch component is used for interfacing with ElasticSearch server using 5.x REST API.
+
+| link:camel-elasticsearch/src/main/docs/elasticsearch-component.adoc[Elasticsearch] (camel-elasticsearch) +
+`elasticsearch:clusterName` | 2.11 | *deprecated* The elasticsearch component is used for interfacing with ElasticSearch server.
+
+| link:camel-elasticsearch5/src/main/docs/elasticsearch5-component.adoc[Elasticsearch5] (camel-elasticsearch5) +
+`elasticsearch5:clusterName` | 2.19 | *deprecated* The elasticsearch component is used for interfacing with ElasticSearch server using 5.x API.
+
 | link:camel-elsql/src/main/docs/elsql-component.adoc[ElSQL] (camel-elsql) +
 `elsql:elsqlName:resourceUri` | 2.16 | The elsql component is an extension to the existing SQL Component that uses ElSql to define the SQL queries.
 
@@ -434,6 +443,9 @@ Number of Components: 287 in 190 JAR artifacts (1 deprecated)
 | link:camel-jgroups/src/main/docs/jgroups-component.adoc[JGroups] (camel-jgroups) +
 `jgroups:clusterName` | 2.13 | The jgroups component provides exchange of messages between Camel and JGroups clusters.
 
+| link:camel-jgroups-raft/src/main/docs/jgroups-raft-component.adoc[JGroups raft] (camel-jgroups-raft) +
+`jgroups-raft:clusterName` | 2.24 | The jgroups component provides exchange of messages between Camel and JGroups clusters.
+
 | link:camel-jing/src/main/docs/jing-component.adoc[Jing] (camel-jing) +
 `jing:resourceUri` | 1.1 | Validates the payload of a message using RelaxNG Syntax using Jing library.
 
@@ -1029,7 +1041,11 @@ Miscellaneous Components
 ^^^^^^^^^^^^^^^^^^^^^^^^
 
 // others: START
+<<<<<<< HEAD
 Number of Miscellaneous Components: 31 in 31 JAR artifacts (0 deprecated)
+=======
+Number of Miscellaneous Components: 45 in 45 JAR artifacts (14 deprecated)
+>>>>>>> 6feb844... CAMEL-11888 - camel-jgroups-raft initial commit.
 
 [width="100%",cols="4,1,5",options="header"]
 |===
@@ -1073,6 +1089,8 @@ Number of Miscellaneous Components: 31 in 31 JAR artifacts (0 deprecated)
 
 | link:camel-spring-cloud-zookeeper/src/main/docs/spring-cloud-zookeeper.adoc[Spring Cloud Zookeeper] (camel-spring-cloud-zookeeper) | 2.19 | Camel Cloud integration with Spring Cloud Zookeeper
 
+| link:camel-spring-dm/src/main/docs/spring-dm.adoc[Spring DM] (camel-spring-dm) | 2.18 | *deprecated* Camel SpringDM (OSGi) XML DSL
+
 | link:camel-spring-javaconfig/src/main/docs/spring-javaconfig.adoc[Spring Java Configuration] (camel-spring-javaconfig) | 2.0 | Using Camel with Spring Java Configuration
 
 | link:camel-spring-security/src/main/docs/spring-security.adoc[Spring Security] (camel-spring-security) | 2.3 | Security using Spring Security
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index de68c22..2b5d778 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -235,6 +235,8 @@
 	* [Ehcache](ehcache-component.adoc)
 	* [EJB](ejb-component.adoc)
 	* [Elastichsearch Rest](elasticsearch-rest-component.adoc)
+	* [Elasticsearch](elasticsearch-component.adoc)
+	* [Elasticsearch5](elasticsearch5-component.adoc)
 	* [ElSQL](elsql-component.adoc)
 	* [etcd](etcd-component.adoc)
 	* [Exec](exec-component.adoc)
@@ -301,6 +303,7 @@
 	* [Jetty 9](jetty-component.adoc)
 	* [Jetty Websocket](websocket-component.adoc)
 	* [JGroups](jgroups-component.adoc)
+	* [JGroups raft](jgroups-raft-component.adoc)
 	* [Jing](jing-component.adoc)
 	* [JMS](jms-component.adoc)
 	* [JMX](jmx-component.adoc)
@@ -452,6 +455,7 @@
 	* [Spring Cloud Consul](spring-cloud-consul.adoc)
 	* [Spring Cloud Netflix](spring-cloud-netflix.adoc)
 	* [Spring Cloud Zookeeper](spring-cloud-zookeeper.adoc)
+	* [Spring DM](spring-dm.adoc)
 	* [Spring Java Configuration](spring-javaconfig.adoc)
 	* [Spring Security](spring-security.adoc)
 	* [Swagger Java](swagger-java.adoc)
diff --git a/parent/pom.xml b/parent/pom.xml
index 5c03bfb..68be5c4 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -389,6 +389,10 @@
     <jettison-version>1.4.0</jettison-version>
     <jgit-version>5.1.3.201810200350-r</jgit-version>
     <jgroups-version>4.0.15.Final</jgroups-version>
+    <jgroups-raft-version>0.4.2.Final</jgroups-raft-version>
+    <jgroups-raft-jgroups-version>4.0.15.Final</jgroups-raft-jgroups-version>
+    <jgroups-raft-leveldbjni-version>1.8</jgroups-raft-leveldbjni-version>
+    <jgroups-raft-mapdb-version>1.0.8</jgroups-raft-mapdb-version>
     <libthrift-version>0.11.0</libthrift-version>
     <jibx-version>1.2.6</jibx-version>
     <jing-bundle-version>20030619_5</jing-bundle-version>
@@ -1517,6 +1521,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
+        <artifactId>camel-jgroups-raft</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
         <artifactId>camel-jibx</artifactId>
         <version>${project.version}</version>
       </dependency>
@@ -3016,6 +3025,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
+        <artifactId>camel-jgroups-raft-starter</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
         <artifactId>camel-jibx-starter</artifactId>
         <version>${project.version}</version>
       </dependency>
diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml
index 43d3c4a..faac3d5 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -1244,6 +1244,17 @@
     <bundle>mvn:org.apache.camel/camel-jgroups/${project.version}</bundle>
     <bundle dependency='true'>mvn:org.jgroups/jgroups/${jgroups-version}</bundle>
   </feature>
+  <feature name='camel-jgroups-raft' version='${project.version}' resolver='(obr)' start-level='50'>
+    <feature version='${project.version}'>camel-core</feature>
+    <bundle dependency='true'>mvn:commons-io/commons-io/${commons-io-version}</bundle>
+    <bundle dependency='true'>mvn:org.apache.camel/camel-jgroups-raft/${project.version}</bundle>
+    <bundle dependency='true'>mvn:org.jgroups/jgroups/${jgroups-raft-jgroups-version}</bundle>
+    <bundle dependency='true'>mvn:org.jgroups/jgroups-raft/${jgroups-raft-version}</bundle>
+    <bundle dependency='true'>mvn:org.fusesource.leveldbjni/leveldbjni-all/${jgroups-raft-leveldbjni-version}</bundle>
+    <bundle dependency='true'>mvn:org.mapdb/mapdb/${jgroups-raft-mapdb-version}</bundle>
+  </feature>
+
+
   <feature name='camel-jibx' version='${project.version}' resolver='(obr)' start-level='50'>
     <details>camel-jibx does not work with Java 8</details>
     <feature version='${project.version}'>camel-core</feature>
diff --git a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/pom.xml b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/pom.xml
new file mode 100644
index 0000000..a7d8e52
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/pom.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>components-starter</artifactId>
+    <version>2.24.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>camel-jgroups-raft-starter</artifactId>
+  <packaging>jar</packaging>
+  <name>Spring-Boot Starter :: Camel :: jgroups-raft</name>
+  <description>Spring-Boot Starter for Camel jgroups-raft support</description>
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter</artifactId>
+      <version>${spring-boot-version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-jgroups-raft</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <!--START OF GENERATED CODE-->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-core-starter</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-spring-boot-starter</artifactId>
+    </dependency>
+    <!--END OF GENERATED CODE-->
+  </dependencies>
+</project>
diff --git a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/JGroupsRaftComponentAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/JGroupsRaftComponentAutoConfiguration.java
new file mode 100644
index 0000000..c5f62da
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/JGroupsRaftComponentAutoConfiguration.java
@@ -0,0 +1,129 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft.springboot;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.jgroups.raft.JGroupsRaftComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spi.HasId;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans;
+import org.apache.camel.spring.boot.util.GroupCondition;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Conditional;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
+@Configuration
+@Conditional({ConditionalOnCamelContextAndAutoConfigurationBeans.class,
+        JGroupsRaftComponentAutoConfiguration.GroupConditions.class})
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,
+        JGroupsRaftComponentConfiguration.class})
+public class JGroupsRaftComponentAutoConfiguration {
+
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(JGroupsRaftComponentAutoConfiguration.class);
+    @Autowired
+    private ApplicationContext applicationContext;
+    @Autowired
+    private CamelContext camelContext;
+    @Autowired
+    private JGroupsRaftComponentConfiguration configuration;
+    @Autowired(required = false)
+    private List<ComponentCustomizer<JGroupsRaftComponent>> customizers;
+
+    static class GroupConditions extends GroupCondition {
+        public GroupConditions() {
+            super("camel.component", "camel.component.jgroups-raft");
+        }
+    }
+
+    @Lazy
+    @Bean(name = "jgroups-raft-component")
+    @ConditionalOnMissingBean(JGroupsRaftComponent.class)
+    public JGroupsRaftComponent configureJGroupsRaftComponent()
+            throws Exception {
+        JGroupsRaftComponent component = new JGroupsRaftComponent();
+        component.setCamelContext(camelContext);
+        Map<String, Object> parameters = new HashMap<>();
+        IntrospectionSupport.getProperties(configuration, parameters, null,
+                false);
+        for (Map.Entry<String, Object> entry : parameters.entrySet()) {
+            Object value = entry.getValue();
+            Class<?> paramClass = value.getClass();
+            if (paramClass.getName().endsWith("NestedConfiguration")) {
+                Class nestedClass = null;
+                try {
+                    nestedClass = (Class) paramClass.getDeclaredField(
+                            "CAMEL_NESTED_CLASS").get(null);
+                    HashMap<String, Object> nestedParameters = new HashMap<>();
+                    IntrospectionSupport.getProperties(value, nestedParameters,
+                            null, false);
+                    Object nestedProperty = nestedClass.newInstance();
+                    CamelPropertiesHelper.setCamelProperties(camelContext,
+                            nestedProperty, nestedParameters, false);
+                    entry.setValue(nestedProperty);
+                } catch (NoSuchFieldException e) {
+                }
+            }
+        }
+        CamelPropertiesHelper.setCamelProperties(camelContext, component,
+                parameters, false);
+        if (ObjectHelper.isNotEmpty(customizers)) {
+            for (ComponentCustomizer<JGroupsRaftComponent> customizer : customizers) {
+                boolean useCustomizer = (customizer instanceof HasId)
+                        ? HierarchicalPropertiesEvaluator.evaluate(
+                                applicationContext.getEnvironment(),
+                                "camel.component.customizer",
+                                "camel.component.jgroups-raft.customizer",
+                                ((HasId) customizer).getId())
+                        : HierarchicalPropertiesEvaluator.evaluate(
+                                applicationContext.getEnvironment(),
+                                "camel.component.customizer",
+                                "camel.component.jgroups-raft.customizer");
+                if (useCustomizer) {
+                    LOGGER.debug("Configure component {}, with customizer {}",
+                            component, customizer);
+                    customizer.customize(component);
+                }
+            }
+        }
+        return component;
+    }
+}
\ No newline at end of file
diff --git a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/JGroupsRaftComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/JGroupsRaftComponentConfiguration.java
new file mode 100644
index 0000000..28db1c3
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/JGroupsRaftComponentConfiguration.java
@@ -0,0 +1,105 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft.springboot;
+
+import javax.annotation.Generated;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * The jgroups component provides exchange of messages between Camel and JGroups
+ * clusters.
+ * 
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
+@ConfigurationProperties(prefix = "camel.component.jgroups-raft")
+public class JGroupsRaftComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
+
+    /**
+     * Whether to enable auto configuration of the jgroups-raft component. This
+     * is enabled by default.
+     */
+    private Boolean enabled;
+    /**
+     * RaftHandle to use. The option is a org.jgroups.raft.RaftHandle type.
+     */
+    private String raftHandle;
+    /**
+     * StateMachine to use. The option is a
+     * org.jgroups.protocols.raft.StateMachine type.
+     */
+    private String stateMachine;
+    /**
+     * Unique raftId to use.
+     */
+    private String raftId;
+    /**
+     * Specifies configuration properties of the RaftHandle JChannel used by the
+     * endpoint (ignored if raftHandle ref is provided).
+     */
+    private String channelProperties = "raft.xml";
+    /**
+     * Whether the component should resolve property placeholders on itself when
+     * starting. Only properties which are of String type can use property
+     * placeholders.
+     */
+    private Boolean resolvePropertyPlaceholders = true;
+
+    public String getRaftHandle() {
+        return raftHandle;
+    }
+
+    public void setRaftHandle(String raftHandle) {
+        this.raftHandle = raftHandle;
+    }
+
+    public String getStateMachine() {
+        return stateMachine;
+    }
+
+    public void setStateMachine(String stateMachine) {
+        this.stateMachine = stateMachine;
+    }
+
+    public String getRaftId() {
+        return raftId;
+    }
+
+    public void setRaftId(String raftId) {
+        this.raftId = raftId;
+    }
+
+    public String getChannelProperties() {
+        return channelProperties;
+    }
+
+    public void setChannelProperties(String channelProperties) {
+        this.channelProperties = channelProperties;
+    }
+
+    public Boolean getResolvePropertyPlaceholders() {
+        return resolvePropertyPlaceholders;
+    }
+
+    public void setResolvePropertyPlaceholders(
+            Boolean resolvePropertyPlaceholders) {
+        this.resolvePropertyPlaceholders = resolvePropertyPlaceholders;
+    }
+}
\ No newline at end of file
diff --git a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/cluster/springboot/JGroupsRaftClusterServiceAutoConfiguration.java b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/cluster/springboot/JGroupsRaftClusterServiceAutoConfiguration.java
new file mode 100644
index 0000000..81f7a08
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/cluster/springboot/JGroupsRaftClusterServiceAutoConfiguration.java
@@ -0,0 +1,53 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft.springboot.cluster.springboot;
+
+import org.apache.camel.cluster.CamelClusterService;
+import org.apache.camel.component.jgroups.raft.cluster.JGroupsRaftClusterService;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.cluster.ClusteredRouteControllerAutoConfiguration;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import org.springframework.boot.autoconfigure.AutoConfigureBefore;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Scope;
+
+@Configuration
+@AutoConfigureBefore({ ClusteredRouteControllerAutoConfiguration.class, CamelAutoConfiguration.class })
+@ConditionalOnProperty(prefix = "camel.component.jgroups.raft.cluster.service", name = "enabled")
+@EnableConfigurationProperties(JGroupsRaftClusterServiceConfiguration.class)
+public class JGroupsRaftClusterServiceAutoConfiguration {
+    @Autowired
+    private JGroupsRaftClusterServiceConfiguration configuration;
+
+    @Bean(name = "jgroups-raft-cluster-service")
+    @Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)
+    public CamelClusterService jgroupsRaftClusterService() throws Exception {
+        JGroupsRaftClusterService service = new JGroupsRaftClusterService();
+
+        IntrospectionSupport.setProperties(
+            service,
+            IntrospectionSupport.getNonNullProperties(configuration)
+        );
+
+        return service;
+    }
+}
diff --git a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/cluster/springboot/JGroupsRaftClusterServiceConfiguration.java b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/cluster/springboot/JGroupsRaftClusterServiceConfiguration.java
new file mode 100644
index 0000000..7ff8aed
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/java/org/apache/camel/component/jgroups/raft/springboot/cluster/springboot/JGroupsRaftClusterServiceConfiguration.java
@@ -0,0 +1,89 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jgroups.raft.springboot.cluster.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@ConfigurationProperties(prefix = "camel.component.jgroups.raft.cluster.service")
+public class JGroupsRaftClusterServiceConfiguration {
+    /**
+     * Sets if the jgroups raft cluster service should be enabled or not, default is false.
+     */
+    private boolean enabled;
+
+    /**
+     * Cluster Service ID
+     */
+    private String id;
+
+    public String getRaftId() {
+        return raftId;
+    }
+
+    public void setRaftId(String raftId) {
+        this.raftId = raftId;
+    }
+
+    /**
+     * JGroups-raft ID
+     */
+    private String raftId;
+
+
+    /**
+     * JGrups-raft configuration File name
+     */
+    private String jgroupsRaftConfig;
+
+    /**
+     * JGroups Cluster name
+     */
+    private String jgroupsRaftClusterName;
+
+
+    public boolean isEnabled() {
+        return enabled;
+    }
+
+    public void setEnabled(boolean enabled) {
+        this.enabled = enabled;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getJgroupsRaftConfig() {
+        return jgroupsRaftConfig;
+    }
+
+    public void setJgroupsRaftConfig(String jgroupsRaftConfig) {
+        this.jgroupsRaftConfig = jgroupsRaftConfig;
+    }
+
+    public String getJgroupsRaftClusterName() {
+        return jgroupsRaftClusterName;
+    }
+
+    public void setJgroupsRaftClusterName(String jgroupsRaftClusterName) {
+        this.jgroupsRaftClusterName = jgroupsRaftClusterName;
+    }
+}
diff --git a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/LICENSE.txt b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/LICENSE.txt
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/LICENSE.txt
@@ -0,0 +1,203 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
diff --git a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/NOTICE.txt b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/NOTICE.txt
new file mode 100644
index 0000000..2e215bf
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/NOTICE.txt
@@ -0,0 +1,11 @@
+   =========================================================================
+   ==  NOTICE file corresponding to the section 4 d of                    ==
+   ==  the Apache License, Version 2.0,                                   ==
+   ==  in this case for the Apache Camel distribution.                    ==
+   =========================================================================
+
+   This product includes software developed by
+   The Apache Software Foundation (http://www.apache.org/).
+
+   Please read the different LICENSE files present in the licenses directory of
+   this distribution.
diff --git a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 0000000..26b08f6
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,10 @@
+{
+  "properties": [
+    {
+      "defaultValue": true,
+      "name": "camel.component.jgroups-raft.enabled",
+      "description": "Enable jgroups-raft component",
+      "type": "java.lang.Boolean"
+    }
+  ]
+}
\ No newline at end of file
diff --git a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/spring.factories b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..71812c7
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,21 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.apache.camel.component.jgroups.raft.springboot.JgroupsRaftComponentAutoConfiguration,\
+org.apache.camel.component.jgroups.raft.springboot.JGroupsRaftComponentAutoConfiguration
+
diff --git a/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/spring.provides b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/spring.provides
new file mode 100644
index 0000000..9f9b771
--- /dev/null
+++ b/platforms/spring-boot/components-starter/camel-jgroups-raft-starter/src/main/resources/META-INF/spring.provides
@@ -0,0 +1,17 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+provides: camel-jgroups-raft
diff --git a/platforms/spring-boot/components-starter/pom.xml b/platforms/spring-boot/components-starter/pom.xml
index f4a1e95..9006ac7 100644
--- a/platforms/spring-boot/components-starter/pom.xml
+++ b/platforms/spring-boot/components-starter/pom.xml
@@ -209,6 +209,7 @@
     <module>camel-jetty-common-starter</module>
     <module>camel-jetty-starter</module>
     <module>camel-jetty9-starter</module>
+    <module>camel-jgroups-raft-starter</module>
     <module>camel-jgroups-starter</module>
     <module>camel-jibx-starter</module>
     <module>camel-jing-starter</module>
diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelJgroupsRaftTest.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelJgroupsRaftTest.java
new file mode 100644
index 0000000..0d9c4d6
--- /dev/null
+++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelJgroupsRaftTest.java
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.karaf;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+
+@RunWith(PaxExam.class)
+public class CamelJgroupsRaftTest extends BaseKarafTest {
+
+    public static final String COMPONENT = extractName(CamelJgroupsRaftTest.class);
+
+    @Test
+    public void test() throws Exception {
+        testComponent(COMPONENT);
+    }
+
+
+}
\ No newline at end of file
diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelJgroupsRaftTest.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelJgroupsRaftTest.java
new file mode 100644
index 0000000..cef561d
--- /dev/null
+++ b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelJgroupsRaftTest.java
@@ -0,0 +1,48 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.itest.springboot;
+
+import org.apache.camel.itest.springboot.util.ArquillianPackager;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.Archive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+
+@RunWith(Arquillian.class)
+public class CamelJgroupsRaftTest extends AbstractSpringBootTestSupport {
+
+    @Deployment
+    public static Archive<?> createSpringBootPackage() throws Exception {
+        return ArquillianPackager.springBootPackage(createTestConfig());
+    }
+
+    public static ITestConfig createTestConfig() {
+        return new ITestConfigBuilder()
+                .module(inferModuleName(CamelJgroupsRaftTest.class))
+                .build();
+    }
+
+    @Test
+    public void componentTests() throws Exception {
+        this.runComponentTest(config);
+        this.runModuleUnitTestsIfEnabled(config);
+    }
+
+
+}