Camel Spring Boot

Kamelet

Send messages to or consume messages from Kamelets, the route templates from which Camel creates a route for each use.

What’s inside

Please refer to the above links for usage and configuration details.

Maven coordinates

<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-kamelet-starter</artifactId>
</dependency>

Spring Boot Auto-Configuration

The starter supports 12 options, which are listed below.

Name Description Default Type

camel.component.kamelet.advanced-options

Whether the URI parameters that are neither properties of the Kamelet nor options of the endpoint are also appended to the endpoint the Kamelet wraps, overriding the same option in its URI: the endpoint the route of a source Kamelet consumes from, or the one top-level to() endpoint of a sink or action Kamelet. Creating the route fails when a sink or action Kamelet has no such endpoint or several, or uses toD, enrich or pollEnrich. The advancedOptions option of an endpoint overrides it

false

Boolean

camel.component.kamelet.autowired-enabled

Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.

true

Boolean

camel.component.kamelet.block

Whether the producers of the Kamelet endpoints wait, up to the timeout, for the consumer of the endpoint when it has none, such as while the route that consumes from it is not started yet, or is suspended or stopped. When false, or when the timeout passes, the failIfNoConsumers option of the endpoint decides what happens to the message

true

Boolean

camel.component.kamelet.bridge-error-handler

Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. 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

camel.component.kamelet.enabled

Whether to enable auto configuration of the kamelet component. This is enabled by default.

Boolean

camel.component.kamelet.lazy-start-producer

Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.

false

Boolean

camel.component.kamelet.location

Where to load a Kamelet from when the CamelContext has no route template with its name yet. A location with a file extension is loaded as that file; other locations are directories with a file named after the Kamelet, such as timer-source.kamelet.yaml. Uses the resource syntax (classpath:, file:, http: and so on, classpath when there is no scheme), without wildcards. Several locations can be separated by comma, and the first that exists is used. The location option of an endpoint replaces it

classpath:kamelets

String

camel.component.kamelet.no-error-handler

Whether the routes of the Kamelets run without an error handler. By default the route of a Kamelet uses a copy of the error handler (and the route configuration) of the route that uses the Kamelet, so its redeliveries and dead letter channel apply inside the Kamelet as well; it has no error handler when the step that uses the Kamelet is not wrapped in an error handler, or when that route is itself the route of a Kamelet. When true, an exception in a source Kamelet is handled by the consumer of the Kamelet route (most consumers log it), and an exception in a sink or action Kamelet fails the exchange, which returns to the calling route

false

Boolean

camel.component.kamelet.route-properties

Properties of the Kamelets for one use of a Kamelet, by the route id of the endpoint (kamelet:name/routeId), such as camel.component.kamelet.route-properties[fast].period=1000. They win over templateProperties. Once a templateProperties or routeProperties value applies to a Kamelet, no camel.kamelet.* property is read for it. Environment variables and endpoint parameters win over these

Properties>

camel.component.kamelet.route-template-loader-listener

A listener that is called with each resource the component loads a Kamelet from (by the location option), before the resource is loaded. An exception it throws is logged and ignored. The option is a org.apache.camel.spi.RouteTemplateLoaderListener type.

RouteTemplateLoaderListener

camel.component.kamelet.template-properties

Properties of the Kamelets for every use of a Kamelet, by the name of the Kamelet, such as camel.component.kamelet.template-properties[timer-source].period=1000. Once a templateProperties or routeProperties value applies to a Kamelet, no camel.kamelet.* property is read for it. Environment variables and endpoint parameters win over these

Properties>

camel.component.kamelet.timeout

The time in milliseconds the producers of the Kamelet endpoints wait for a consumer when block is enabled. A value of 0 or less does not wait

30000

Long