// Do not edit directly!
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
[id="extensions-csimple"]
= CSimple
:linkattrs:
:cq-artifact-id: camel-quarkus-csimple
:cq-native-supported: true
:cq-status: Preview
:cq-status-deprecation: Preview
:cq-description: Compiled Simple language
:cq-deprecated: false
:cq-jvm-since: 1.5.0
:cq-native-since: 1.5.0

ifeval::[{doc-show-badges} == true]
[.badges]
[.badge-key]##JVM since##[.badge-supported]##1.5.0## [.badge-key]##Native since##[.badge-supported]##1.5.0##
endif::[]

Compiled Simple language

[id="extensions-csimple-whats-inside"]
== What's inside

* xref:{cq-camel-components}:languages:csimple-language.adoc[CSimple language]

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

[id="extensions-csimple-maven-coordinates"]
== Maven coordinates

https://{link-quarkus-code-generator}/?extension-search=camel-quarkus-csimple[Create a new project with this extension on {link-quarkus-code-generator}, window="_blank"]

Or add the coordinates to your existing project:

[source,xml]
----
<dependency>
    <groupId>org.apache.camel.quarkus</groupId>
    <artifactId>camel-quarkus-csimple</artifactId>
</dependency>
----
ifeval::[{doc-show-user-guide-link} == true]
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
endif::[]

[id="extensions-csimple-camel-quarkus-limitations"]
== Camel Quarkus limitations

CSimple language is supported in all existing DSLs, but be aware that to extract the expressions from the existing route definitions, a dry run is done during the startup in JVM mode or during the build in Native mode which adds some log entries of the following type that you can simply ignore.

[source,text]
----
2023-01-19 16:36:31,779 INFO  [org.apa.cam.mai.MainSupport] (build-10) Expression Extractor 3.20.1 is starting
2023-01-19 16:36:32,214 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (build-10) Apache Camel 3.20.1 (Expression Extractor) is starting
2023-01-19 16:36:32,216 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (build-10) Routes startup (started:0)
2023-01-19 16:36:32,217 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (build-10) Apache Camel 3.20.1 (Expression Extractor) started in 128ms (build:22ms init:104ms start:2ms)
2023-01-19 16:36:32,218 INFO  [org.apa.cam.mai.MainSupport] (build-10) Waiting until complete: Duration max 1 seconds
2023-01-19 16:36:33,223 INFO  [org.apa.cam.mai.MainSupport] (build-10) Duration max seconds triggering shutdown of the JVM
2023-01-19 16:36:33,223 INFO  [org.apa.cam.mai.MainSupport] (build-10) Expression Extractor 3.20.1 shutdown
----

The compilation of CSimple scripts happens at build time by default. To be able to discover the scripts in the route definitions,
those definitions need to get assembled at build time. When extending
`org.apache.camel.builder.RouteBuilder`, this basically means instantiating your `RouteBuilder`, setting
a fake `CamelContext` instance on it and calling its `configure()` method. It may fail if your `configure()`
method attempts to access some resource that is only available at runtime.

You can use the `quarkus.camel.expression.on-build-time-analysis-failure` configuration parameter to decide
what should happen in such cases. Possible values are `warn` (default), `fail` or `ignore`.

You can also simply disable the expression extraction process by setting the configuration parameter `quarkus.camel.expression.extraction-enabled` to `false`.

If the expression extraction process is disabled or fails, the expressions are then compiled at runtime which also means that it
can only work in JVM mode moreover the artifact `org.apache.camel:camel-csimple-joor` has to be added to the classpath.

[WARNING]
====
CSimple language will not work on Camel Quarkus if used in a `org.apache.camel.builder.LambdaRouteBuilder` or if a `RouteBuilder` depends on dependency injection.
====


