Kamelet

Kamelets (Kamel route snippets) allow users to connect to external systems via a simplified interface, hiding all the low level details about how those connections are implemented.

The Kamelet EIP allows to call Kamelets (route templates). When calling a Kamelet you may just refer to the name (template id) of the Kamelet in the EIP as shown below:

from("direct:start")
    .kamelet("foo")
    .to("mock:result");
<camelContext xmlns="http://camel.apache.org/schema/spring">
  <route>
    <from uri="direct:start"/>
    <kamelet name="foo"/>
    <to uri="mock:result"/>
  </route>
</camelContext>

Camel will then, when starting:

  • lookup the route template with the given id (i.e. foo) from the Camel context

  • create a new route based on the route template

Options

The Kamelet EIP supports 1 options which are listed below:

Name Description Default Type

name

Required Name of the Kamelet (templateId/routeId) to call. Options for the kamelet can be specified using uri syntax, eg mynamecount=4&type=gold.

String

Dependency

The implementation of the Kamelet EIP is located in the camel-kamelet JAR, so you should add the following dependency:

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-kamelet</artifactId>
    <!-- use the same version as your Camel core version -->
    <version>x.y.z</version>
</dependency>