You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:cq-example-description: An example that uses the Camel variables which can be configured from application.properties.
3
+
4
+
{cq-description}
5
+
6
+
TIP: Check the https://camel.apache.org/camel-quarkus/latest/first-steps.html[Camel Quarkus User guide] for prerequisites
7
+
and other general information.
8
+
9
+
== Start in the Development mode
10
+
11
+
[source,shell]
12
+
----
13
+
$ mvn clean compile quarkus:dev
14
+
----
15
+
16
+
The above command compiles the project, starts the application and lets the Quarkus tooling watch for changes in your
17
+
workspace. Any modifications in your project will automatically take effect in the running application.
18
+
19
+
TIP: Please refer to the Development mode section of
20
+
https://camel.apache.org/camel-quarkus/latest/first-steps.html#_development_mode[Camel Quarkus User guide] for more details.
21
+
22
+
Then look at the log output in the console. There are log messages generated from a second route. First several message show random number `N/A` (as is defined in application.properties). Following messages show random number generated by the first route, which starts delayed.
23
+
24
+
As we run the example in Quarkus Dev Mode, you can edit the source code and have live updates.
25
+
For example, try to change the default greeting message in `application.properties` to `Greeting`.
26
+
27
+
The delay of the random member generation and period at which the timer fires can be changed by modifying configuration properties `timer.period` and
28
+
`timer.delay` in `application.properties`. You can also override the default values via the command line with JVM arguments
29
+
`-Dtimer.period=100 -Dtimer.delay=1000'
30
+
31
+
=== Package and run the application
32
+
33
+
Once you are done with developing you may want to package and run the application.
34
+
35
+
TIP: Find more details about the JVM mode and Native mode in the Package and run section of
36
+
https://camel.apache.org/camel-quarkus/latest/first-steps.html#_package_and_run_the_application[Camel Quarkus User guide]
37
+
38
+
==== JVM mode
39
+
40
+
[source,shell]
41
+
----
42
+
$ mvn clean package
43
+
$ java -jar target/quarkus-app/quarkus-run.jar
44
+
...
45
+
[io.quarkus] (main) camel-quarkus-examples-... started in 1.163s.
46
+
----
47
+
48
+
==== Native mode
49
+
50
+
IMPORTANT: Native mode requires having GraalVM and other tools installed. Please check the Prerequisites section
51
+
of https://camel.apache.org/camel-quarkus/latest/first-steps.html#_prerequisites[Camel Quarkus User guide].
52
+
53
+
To prepare a native executable using GraalVM, run the following command:
54
+
55
+
[source,shell]
56
+
----
57
+
$ mvn clean package -Pnative
58
+
$ ./target/*-runner
59
+
...
60
+
[io.quarkus] (main) camel-quarkus-examples-... started in 0.013s.
61
+
...
62
+
----
63
+
64
+
== Feedback
65
+
66
+
Please report bugs and propose improvements via https://github.com/apache/camel-quarkus/issues[GitHub issues of Camel Quarkus] project.
0 commit comments