Camel Spring Boot

MVEL

Transform messages using an MVEL template.

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-mvel-starter</artifactId>
</dependency>

Spring Boot Auto-Configuration

The starter supports 7 options, which are listed below.

Name Description Default Type

camel.component.mvel.allow-context-map-all

Whether the variables that the producer gives the MVEL template also include exchange, in, request, out, response, exchangeProperty, exchangeProperties and camelContext (out and response only when the exchange pattern is InOut). If false, the template gets only body, header, headers, variable, variables and exception. Enabling it gives the template the whole Exchange and CamelContext API. It does not limit MVEL itself, which can call any Java class in either case. The default for the endpoints of the component.

false

Boolean

camel.component.mvel.allow-template-from-header

Whether the producer reads the CamelMvelResourceUri and CamelMvelTemplate headers. If false, the producer ignores both headers. A template from a header can do all that MVEL allows, such as calling the methods of any Java class, for example System or Runtime, and the CamelMvelResourceUri header can name any resource, such as a file or an http URL. Enable it only when the route sets these headers, not a message sender. The default for the endpoints of the component.

false

Boolean

camel.component.mvel.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.mvel.content-cache

Whether the endpoints of the component cache their template, unless the contentCache option of the endpoint says otherwise. If true, the producer reads the template of resourceUri once and keeps its content, so a change to the resource is only seen after the content cache is cleared, for example with the clearContentCache JMX operation. If false, the producer reads the resource on each exchange, and compiles it again only when its text changed.

true

Boolean

camel.component.mvel.enabled

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

Boolean

camel.component.mvel.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.language.mvel.enabled

Whether to enable auto configuration of the mvel language. This is enabled by default.

Boolean