ppalaga commented on a change in pull request #1344:
URL: https://github.com/apache/camel-quarkus/pull/1344#discussion_r441749385



##########
File path: examples/timer-log-cdi/src/main/java/org/acme/timer/TimerRoute.java
##########
@@ -31,18 +31,24 @@
 @ApplicationScoped
 public class TimerRoute extends RouteBuilder {
 
-    /** {@code timer.period} is defined in {@code 
src/main/resources/application.properties} */
+    /**
+     * {@code timer.period} is defined in {@code 
src/main/resources/application.properties}
+     */
     @ConfigProperty(name = "timer.period", defaultValue = "1000")
     String period;
 
-    /** An injected bean */
+    /**
+     * An injected bean
+     */
     @Inject
     Counter counter;
 
     @Override
     public void configure() throws Exception {
         fromF("timer:foo?period=%s", period)
                 .setBody(exchange -> "Incremented the counter: " + 
counter.increment())
-                
.to("log:example?showExchangePattern=false&showBodyType=false");
+                // the configuration of the log component is programmatically 
done using CDI

Review comment:
       ```suggestion
                   // the configuration of the log component is done 
programmatically using CDI
   ```

##########
File path: docs/modules/ROOT/pages/user-guide/bootstrap.adoc
##########
@@ -0,0 +1,35 @@
+= Bootstrap Camel Quarkus
+:page-aliases: bootstrap.adoc

Review comment:
       ```suggestion
   ```
   If bootstrap.adoc is  a new page, there is no point in adding an alias. 
Aliases serve for setting redirects and we use them mainly when we move a page.
   

##########
File path: docs/modules/ROOT/pages/user-guide/bootstrap.adoc
##########
@@ -0,0 +1,35 @@
+= Bootstrap Camel Quarkus
+:page-aliases: bootstrap.adoc
+
+Camel Quarkus automatically configure and deploy a Camel Context bean which by 
default is started/stopped according to the Quarkus Application lifecycle. The 
configuration step happens at build time during Quarkus' augmentation phase and 
it is driven by the Camel Quarkus extensions which can be tuned using Camel 
Quarkus specific properties indentified by "camel.quarkus" as prefix. After the 
configuration is done, a minimal Camel Runtime is assembled and started at 
RUNTIME_INIT time. At that point, any additional configuration should be done 
using CDI, below an example bout how to configure a Camel Component:
+
+[source,java]
+----
+@ApplicationScoped

Review comment:
       Please add all or at least the most important imports.

##########
File path: docs/modules/ROOT/pages/user-guide/bootstrap.adoc
##########
@@ -0,0 +1,35 @@
+= Bootstrap Camel Quarkus
+:page-aliases: bootstrap.adoc
+
+Camel Quarkus automatically configure and deploy a Camel Context bean which by 
default is started/stopped according to the Quarkus Application lifecycle. The 
configuration step happens at build time during Quarkus' augmentation phase and 
it is driven by the Camel Quarkus extensions which can be tuned using Camel 
Quarkus specific properties indentified by "camel.quarkus" as prefix. After the 
configuration is done, a minimal Camel Runtime is assembled and started at 
RUNTIME_INIT time. At that point, any additional configuration should be done 
using CDI, below an example bout how to configure a Camel Component:

Review comment:
       ```suggestion
   Camel Quarkus automatically configures and deploys a Camel Context bean 
which by default is started/stopped according to the Quarkus Application 
lifecycle. The configuration step happens at build time during Quarkus' 
augmentation phase and it is driven by the Camel Quarkus extensions which can 
be tuned using Camel Quarkus specific `camel.quarkus.*` properties. After the 
configuration is done, a minimal Camel Runtime is assembled and started at 
`RUNTIME_INIT` time. At that point, any additional configuration should be done 
using CDI. Below is an example showing how to configure a Camel Component:
   ```

##########
File path: docs/modules/ROOT/pages/user-guide/bootstrap.adoc
##########
@@ -0,0 +1,35 @@
+= Bootstrap Camel Quarkus
+:page-aliases: bootstrap.adoc
+
+Camel Quarkus automatically configure and deploy a Camel Context bean which by 
default is started/stopped according to the Quarkus Application lifecycle. The 
configuration step happens at build time during Quarkus' augmentation phase and 
it is driven by the Camel Quarkus extensions which can be tuned using Camel 
Quarkus specific properties indentified by "camel.quarkus" as prefix. After the 
configuration is done, a minimal Camel Runtime is assembled and started at 
RUNTIME_INIT time. At that point, any additional configuration should be done 
using CDI, below an example bout how to configure a Camel Component:
+
+[source,java]
+----
+@ApplicationScoped
+public class Configurations {
+    /**
+     * Produces a {@link LogComponent} instance with a custom exchange 
formatter.
+     */
+    @Named
+    LogComponent log() {
+        DefaultExchangeFormatter formatter = new DefaultExchangeFormatter();
+        formatter.setShowExchangePattern(false);
+        formatter.setShowBodyType(false);
+
+        LogComponent component = new LogComponent();
+        component.setExchangeFormatter(formatter);
+
+        return component;
+    }
+}
+----
+
+To configure component and other aspects of Apache Camel through properties, 
you can add the camel-core-main extension which brings functionnalities from 
https://camel.apache.org/components/latest/others/main.html[Apache Camel Main] 
to Camel Quarkus. By adding such extension the programmatic configuration of 
the Log Component done above, can be done through properties:

Review comment:
       ```suggestion
   To configure component and other aspects of Apache Camel through properties, 
you can add the `camel-core-main` extension which brings functionalities from 
https://camel.apache.org/components/latest/others/main.html[Apache Camel Main] 
to Camel Quarkus. By adding such extension the programmatic configuration of 
the Log Component done above, can be done through properties:
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to