Core
JVM since0.0.1 Native since0.0.1
Camel core functionality and basic Camel languages: Constant, ExchangeProperty, Header, Ref, Simple and Tokenize
Maven coordinates
Or add the coordinates to your existing project:
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-core</artifactId>
</dependency>
Check the User guide for more information about writing Camel Quarkus applications.
Additional Camel Quarkus configuration
Simple language
Using the OGNL notation
When using the OGNL notation from the simple language, the camel-quarkus-bean
extension should be used.
For instance, the simple expression below is accessing the getAddress()
method on the message body of type Client
.
---
simple("${body.address}")
---
In such a situation, one should take an additional dependency on the camel-quarkus-bean extension as described here. Note that in native mode, some classes may need to be registered for reflection. In the example above, the Client
class needs to be registered for reflection.
Using dynamic type resolution in native mode
When dynamically resolving a type from simple expressions like:
-
simple("${mandatoryBodyAs(TYPE)}")
-
simple("${type:package.Enum.CONSTANT}")
-
from("…").split(bodyAs(TYPE.class))
-
simple("${body} is TYPE")
It may be needed to register some classes for reflection manually.
For instance, the simple expression below is dynamically resolving the type java.nio.ByteBuffer
at runtime:
---
simple("${body} is 'java.nio.ByteBuffer'")
---
As such, the class java.nio.ByteBuffer
needs to be registered for reflection.
Using the simple language with classpath resources in native mode
If your route is supposed to load a Simple script from classpath, like in the following example
from("direct:start").transform().simple("resource:classpath:mysimple.txt");
then you need to use Quarkus quarkus.native.resources.includes
property to include the resource in the native executable as demonstrated below:
quarkus.native.resources.includes = mysimple.txt
More information about selecting resources for inclusion in the native executable can be found at Embedding resource in native executable.
Configuring a custom bean via properties in native mode
When specifying a custom bean via properties in native mode with configuration like #class:*
or #type:*
, it may be needed to register some classes for reflection manually.
For instance, the custom bean definition below involves the use of reflection for bean instantiation and setter invocation:
---
camel.beans.customBeanWithSetterInjection = #class:org.example.PropertiesCustomBeanWithSetterInjection
camel.beans.customBeanWithSetterInjection.counter = 123
---
As such, the class PropertiesCustomBeanWithSetterInjection
needs to be registered for reflection, note that field access could be omitted in this case.
Configuration property | Type | Default |
---|---|---|
A comma-separated list of Ant-path style patterns to match Camel service definition files in the classpath. The services defined in the matching files will not be discoverable via the ** The excludes have higher precedence than includes. The excludes defined here can also be used to veto the discoverability of services included by Camel Quarkus extensions. Example values: | List of | |
A comma-separated list of Ant-path style patterns to match Camel service definition files in the classpath. The services defined in the matching files will be discoverable via the Note that Camel Quarkus extensions may include some services by default. The services selected here added to those services and the exclusions defined in Example values: | List of | |
A comma-separated list of Ant-path style patterns to match Camel service definition files in the classpath. The services defined in the matching files will not be added to Camel registry during application’s static initialization. The excludes have higher precedence than includes. The excludes defined here can also be used to veto the registration of services included by Camel Quarkus extensions. Example values: | List of | |
A comma-separated list of Ant-path style patterns to match Camel service definition files in the classpath. The services defined in the matching files will be added to Camel registry during application’s static initialization unless the given file is excluded via Note that Camel Quarkus extensions may include some services by default. The services selected here added to those services and the exclusions defined in Example values: | List of | |
If Setting this to |
|
|
If Setting this to |
|
|
If Setting this to |
|
|
If Setting this to |
|
|
If Setting this to |
|
|
If Setting this to |
|
|
Enable automatic discovery of routes during static initialization. |
|
|
Used for exclusive filtering scanning of RouteBuilder classes. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to exclude all classes starting with Bar use: **/Bar* To exclude all routes form a specific package use: com/mycompany/bar/* To exclude all routes form a specific package and its sub-packages use double wildcards: com/mycompany/bar/** And to exclude all routes from two specific packages use: com/mycompany/bar/*,com/mycompany/stuff/* | List of | |
Used for inclusive filtering scanning of RouteBuilder classes. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to include all classes starting with Foo use: **/Foo* To include all routes form a specific package use: com/mycompany/foo/* To include all routes form a specific package and its sub-packages use double wildcards: com/mycompany/foo/** And to include all routes from two specific packages use: com/mycompany/foo/*,com/mycompany/stuff/* | List of | |
A comma separated list of Ant-path style patterns to match class names that should be excluded from registering for reflection. Use the class name format as returned by the This option narrows down the set selected by This option cannot be used to unregister classes which have been registered internally by Quarkus extensions. | List of | |
A comma separated list of Ant-path style patterns to match class names that should be registered for reflection. Use the class name format as returned by the By default, no classes are included. The set selected by this option can be narrowed down by Note that Quarkus extensions typically register the required classes for reflection by themselves. This option is useful in situations when the built in functionality is not sufficient. Note that this option enables the full reflective access for constructors, fields and methods. If you need a finer grained control, consider using For this option to work properly, at least one of the following conditions must be satisfied: - There are no wildcards ( [source,properties] ---- quarkus.index-dependency.my-dep.group-id = org.my-group quarkus.index-dependency.my-dep.artifact-id = my-artifact ---- where | List of | |
If |
|
|
What to do if it is not possible to extract CSimple expressions from a route definition at build time. |
|
|
What to do if it is not possible to extract expressions from a route definition at build time. |
|
|
Indicates whether the expression extraction from the route definitions at build time must be done. If disabled, the expressions are compiled at runtime. |
|
|
Whether to enable the bridging of Camel events to CDI events. This allows CDI observers to be configured for Camel events. E.g. those belonging to the Note that this configuration item only has any effect when observers configured for Camel events are present in the application. |
|
|
Build time configuration options for enable/disable camel source location. |
|
|
Enables tracer in your Camel application. |
|
|
To set the tracer in standby mode, where the tracer will be installed, but not automatically enabled. The tracer can then be enabled explicitly later from Java, JMX or tooling. |
|
|
Defines how many of the last messages to keep in the tracer. |
|
|
Whether all traced messages should be removed when the tracer is dumping. By default, the messages are removed, which means that dumping will not contain previous dumped messages. |
|
|
To limit the message body to a maximum size in the traced message. Use 0 or negative value to use unlimited size. |
|
|
Whether to include the message body of stream based messages. If enabled then beware the stream may not be re-readable later. See more about Stream Caching. |
|
|
Whether to include the message body of file based messages. The overhead is that the file content has to be read from the file. |
|
|
Whether to include the exchange properties in the traced message. |
|
|
Whether to include the exchange variables in the traced message. |
|
|
Whether to include the exception in the traced message in case of failed exchange. |
|
|
Whether to trace routes that is created from Rest DSL. |
|
|
Whether to trace routes that is created from route templates or kamelets. |
|
|
Filter for tracing by route or node id. |
| |
Filter for tracing messages. |
| |
Whether type converter statistics are enabled. By default, type converter utilization statistics are disabled. Note that enabling statistics incurs a minor performance impact under very heavy load. |
|
|
A timeout (with millisecond precision) to wait for |
| |
The action to take when |
|
|
When set to true, the {@link CamelRuntime} will be started automatically. |
|
|
Configuration property fixed at build time. All other configuration properties are overridable at runtime.
About the Duration format To write duration values, use the standard You can also use a simplified format, starting with a number:
In other cases, the simplified format is translated to the
|