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 calling Kamelets (i.e. Route Template). When calling a Kamelet you may just refer to the name (template id) of the Kamelet in the EIP as shown below:
The Kamelet eip supports 1 options, which are listed below.
Required Name of the Kamelet (templateId/routeId) to call. Options for the kamelet can be specified using uri syntax, eg mynamecount=4&type=gold.
Sets the description of this node.
from("direct:start") .kamelet("foo") .to("mock:result");
And in XML
<route> <from uri="direct:start"/> <kamelet name="foo"/> <to uri="mock:result"/> </route>
Camel will then, when starting:
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>
See the example camel-example-kamelet.