(camel) branch filter-kamelet2 deleted (was c6885b21b29)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git


 was c6885b21b29 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(camel) branch main updated: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox) (#13286)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
 new 8318ebaa3b4 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox) (#13286)
8318ebaa3b4 is described below

commit 8318ebaa3b48c921ef217013487f1d01dcf4306f
Author: Claus Ibsen 
AuthorDate: Sun Feb 25 08:59:29 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox) (#13286)

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../main/camel-main-configuration-metadata.json|   2 +
 .../apache/camel/catalog/schemas/camel-spring.xsd  |   1 +
 components/camel-kamelet/pom.xml   |   5 +
 .../apache/camel/component/kamelet/Kamelet.java|   2 +
 .../camel/component/kamelet/KameletProcessor.java  |   3 +
 .../camel/component/kamelet/KameletProducer.java   |  14 ++-
 .../kamelet/ManagedKameletRouteDisabledTest.java   |  87 ++
 .../kamelet/ManagedKameletRouteEnabledTest.java|  93 +++
 .../metrics/routepolicy/MetricsRoutePolicy.java|  24 +++-
 .../MicrometerExchangeEventNotifier.java   |  45 ++--
 .../MicrometerRouteEventNotifier.java  |  20 
 .../routepolicy/MicrometerRoutePolicy.java |  19 ++-
 .../src/main/java/org/apache/camel/Route.java  |  16 +++
 .../java/org/apache/camel/spi/ManagementAgent.java |  28 +
 .../main/java/org/apache/camel/spi/UnitOfWork.java |  15 +++
 .../camel/impl/engine/AbstractCamelContext.java| 127 ++---
 .../org/apache/camel/impl/engine/DefaultRoute.java |  15 +++
 .../camel/impl/engine/DefaultUnitOfWork.java   |  22 
 .../camel/impl/console/ConsumerDevConsole.java |   2 +-
 .../apache/camel/impl/console/RouteDevConsole.java |   5 +-
 .../camel/impl/console/RouteDumpDevConsole.java|   2 +
 .../camel/impl/console/SourceDevConsole.java   |   2 +
 .../apache/camel/impl/console/TopDevConsole.java   |   3 +
 .../org/apache/camel/model/RouteDefinition.java|  16 ++-
 .../org/apache/camel/processor/SendProcessor.java  |   3 +
 .../org/apache/camel/reifier/RouteReifier.java |   2 +
 .../MainConfigurationPropertiesConfigurer.java |  12 ++
 .../camel-main-configuration-metadata.json |   2 +
 core/camel-main/src/main/docs/main.adoc|   4 +-
 .../camel/main/DefaultConfigurationConfigurer.java |   4 +
 .../camel/main/DefaultConfigurationProperties.java |  66 +++
 .../api/management/JmxSystemPropertyKeys.java  |   6 +
 .../api/management/mbean/ManagedRouteMBean.java|   6 +
 .../camel/management/DefaultManagementAgent.java   |  26 +
 .../management/JmxManagementLifecycleStrategy.java |   9 ++
 .../management/mbean/ManagedCamelContext.java  |  21 ++--
 .../camel/management/mbean/ManagedRoute.java   |  10 ++
 .../java/org/apache/camel/xml/in/ModelParser.java  |   1 +
 .../java/org/apache/camel/xml/out/ModelWriter.java |   1 +
 .../org/apache/camel/yaml/out/ModelWriter.java |   1 +
 .../ROOT/pages/camel-4x-upgrade-guide-4_5.adoc |  21 
 docs/user-manual/modules/ROOT/pages/jmx.adoc   |  15 ++-
 42 files changed, 726 insertions(+), 52 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
index 127e310a2c6..f1e51f670bf 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
@@ -70,6 +70,8 @@
 { "name": "camel.main.jmxEnabled", "description": "Enable JMX in your 
Camel application.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": true },
 { "name": "camel.main.jmxManagementMBeansLevel", "description": "Sets the 
mbeans registration level. The default value is Default.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "object", 
"javaType": "org.apache.camel.ManagementMBeansLevel", "defaultValue": "Default" 
},
 { "name": "camel.main.jmxManagementNamePattern", "description": "The 
naming pattern for creating the CamelContext JMX management name. The default 
pattern is #name#", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "string", 
"javaType": "java.lang.String", "defaultValue": "#name#" },
+{ 

Re: [PR] CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox) [camel]

2024-02-24 Thread via GitHub


davsclaus merged PR #13286:
URL: https://github.com/apache/camel/pull/13286


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



(camel) branch main updated: CAMEL-20460: Improve platform http log (#13285)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
 new ff018163bbc CAMEL-20460: Improve platform http log (#13285)
ff018163bbc is described below

commit ff018163bbc182ada10e3ca5f754c5652d0d0afc
Author: Federico Mariani <34543311+cro...@users.noreply.github.com>
AuthorDate: Sun Feb 25 08:59:13 2024 +0100

CAMEL-20460: Improve platform http log (#13285)
---
 catalog/camel-report-maven-plugin/pom.xml  |  6 -
 .../prometheus/MicrometerPrometheus.java   |  3 ++-
 .../platform/http/main/MainHttpServer.java | 18 ++
 .../src/test/resources/log4j2.properties   | 28 ++
 .../component/platform/http/HttpEndpointModel.java | 16 +
 .../platform/http/PlatformHttpComponent.java   |  4 ++--
 .../platform/http/PlatformHttpConsumer.java|  3 ++-
 7 files changed, 64 insertions(+), 14 deletions(-)

diff --git a/catalog/camel-report-maven-plugin/pom.xml 
b/catalog/camel-report-maven-plugin/pom.xml
index d98df4c3b86..b5075eb1579 100644
--- a/catalog/camel-report-maven-plugin/pom.xml
+++ b/catalog/camel-report-maven-plugin/pom.xml
@@ -229,12 +229,6 @@
 ${mockito-version}
 test
 
-
-org.apache.camel
-camel-catalog-common
-4.5.0-SNAPSHOT
-compile
-
 
 
 
diff --git 
a/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java
 
b/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java
index 63289d4b668..3f062140fa3 100644
--- 
a/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java
+++ 
b/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java
@@ -385,6 +385,7 @@ public class MicrometerPrometheus extends ServiceSupport 
implements CamelMetrics
 // use blocking handler as the task can take longer time to complete
 metrics.handler(new BlockingHandlerDecorator(handler, true));
 
-platformHttpComponent.addHttpEndpoint("/q/metrics", null, null);
+platformHttpComponent.addHttpEndpoint("/q/metrics", null,
+null, format,null);
 }
 }
diff --git 
a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java
 
b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java
index 18909f9a94c..c30d2de54fb 100644
--- 
a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java
+++ 
b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java
@@ -332,6 +332,12 @@ public class MainHttpServer extends ServiceSupport 
implements CamelContextAware,
 if (u.getVerbs() != null) {
 line += " (" + u.getVerbs() + ")";
 }
+if (u.getConsumes() != null) {
+line += " accept: " + u.getConsumes();
+}
+if (u.getProduces() != null) {
+line += " produce: " + u.getProduces();
+}
 LOG.info("{}", line);
 }
 }
@@ -441,7 +447,8 @@ public class MainHttpServer extends ServiceSupport 
implements CamelContextAware,
 live.handler(new BlockingHandlerDecorator(handler, true));
 ready.handler(new BlockingHandlerDecorator(handler, true));
 
-platformHttpComponent.addHttpEndpoint("/q/health", null, null);
+platformHttpComponent.addHttpEndpoint("/q/health", null, null,
+"application/json", null);
 }
 
 protected void setupJolokia() {
@@ -457,7 +464,8 @@ public class MainHttpServer extends ServiceSupport 
implements CamelContextAware,
 Handler handler = (Handler) 
jolokiaPlugin.getHandler();
 jolokia.handler(new BlockingHandlerDecorator(handler, true));
 
-platformHttpComponent.addHttpEndpoint("/q/jolokia", null, null);
+platformHttpComponent.addHttpEndpoint("/q/jolokia", null, null,
+"text/plain,application/json",null);
 }
 
 protected PlatformHttpPluginRegistry resolvePlatformHttpPluginRegistry() {
@@ -703,7 +711,8 @@ public class MainHttpServer extends ServiceSupport 
implements CamelContextAware,
 dev.handler(new BlockingHandlerDecorator(handler, true));
 devSub.handler(new BlockingHandlerDecorator(handler, true));
 
-

Re: [PR] CAMEL-20460: Improve platform http log [camel]

2024-02-24 Thread via GitHub


davsclaus merged PR #13285:
URL: https://github.com/apache/camel/pull/13285


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



(camel) branch regen_bot updated (214ebc1f937 -> 27e97a01f86)

2024-02-24 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch regen_bot
in repository https://gitbox.apache.org/repos/asf/camel.git


from 214ebc1f937 CAMEL-20459: documentation fixes for the choice EIP.
 add 7838ec81e58 CAMEL-20459: documentation fixes for the circuit breaker 
EIP.
 add d12359d5de9 CAMEL-20459: documentation fixes for the claim check EIP.
 add 4a348b38506 CAMEL-20459: documentation fixes for the competing 
consumers EIP.
 add 04d29183341 CAMEL-20459: documentation fixes for the composed message 
processor EIP.
 add 887d4408950 CAMEL-20459: documentation fixes for the content enricher 
EIP.
 add ddaa3b07fb1 CAMEL-20459: documentation fixes for the content filter 
EIP.
 add c67a9aebf60 CAMEL-20459: documentation fixes for the convertBodyTo EIP.
 add 5c780d53439 CAMEL-20459: documentation fixes for the convertHeaderTo 
EIP.
 add bf12809ab62 CAMEL-20459: documentation fixes for the convertVariableTo 
EIP.
 add 16aaac9e503 CAMEL-20459: documentation fixes for the correlation 
identifier EIP.
 add a424cdef52c CAMEL-20459: documentation fixes for the custom load 
balancer EIP.
 add e11dbf0ae44 CAMEL-20459: documentation fixes for the dead letter 
channel EIP.
 add d9331f40b4e CAMEL-20459: documentation fixes for the delay EIP.
 add 00cbc060558 CAMEL-20459: documentation fixes for the dynamic router 
EIP.
 add 34d19b36d59 CAMEL-20459: documentation fixes for the enrich EIP.
 add b26db142a34 CAMEL-20459: documentation fixes for the EIP summary page
 add fb4ed6ca860 CAMEL-20459: documentation fixes for the event message EIP.
 add efea68a14ba CAMEL-20459: documentation fixes for the event-driven 
consumer EIP.
 add 27e97a01f86 CAMEL-20459: documentation fixes for the fail-over EIP.

No new revisions were added by this update.

Summary of changes:
 .../modules/eips/pages/circuitBreaker-eip.adoc |  12 +-
 .../docs/modules/eips/pages/claimCheck-eip.adoc|  28 ++--
 .../modules/eips/pages/competing-consumers.adoc|  48 ---
 .../eips/pages/composed-message-processor.adoc |   8 +-
 .../docs/modules/eips/pages/content-enricher.adoc  |  20 +--
 .../modules/eips/pages/content-filter-eip.adoc |   4 +-
 .../docs/modules/eips/pages/convertBodyTo-eip.adoc |   2 +-
 .../modules/eips/pages/convertHeaderTo-eip.adoc|  14 +-
 .../modules/eips/pages/convertVariableTo-eip.adoc  |  14 +-
 .../modules/eips/pages/correlation-identifier.adoc |  14 +-
 .../modules/eips/pages/customLoadBalancer-eip.adoc |   2 +-
 .../modules/eips/pages/dead-letter-channel.adoc| 159 +++--
 .../main/docs/modules/eips/pages/delay-eip.adoc|   6 +-
 .../docs/modules/eips/pages/dynamicRouter-eip.adoc |   4 +-
 .../main/docs/modules/eips/pages/enrich-eip.adoc   |  24 ++--
 .../pages/enterprise-integration-patterns.adoc |  20 +--
 .../docs/modules/eips/pages/event-message.adoc |   9 +-
 .../eips/pages/eventDrivenConsumer-eip.adoc|   2 +-
 .../main/docs/modules/eips/pages/failover-eip.adoc |  47 +++---
 19 files changed, 233 insertions(+), 204 deletions(-)



(camel) 10/19: CAMEL-20459: documentation fixes for the correlation identifier EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 16aaac9e503cdb36b1c75e4fd8676fd877dbc723
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 12:06:52 2024 +0100

CAMEL-20459: documentation fixes for the correlation identifier EIP.

Signed-off-by: Otavio R. Piske 
---
 .../docs/modules/eips/pages/correlation-identifier.adoc| 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/correlation-identifier.adoc
 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/correlation-identifier.adoc
index 3cb13e9e861..9357f201737 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/correlation-identifier.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/correlation-identifier.adoc
@@ -7,17 +7,19 @@ Identifier] from the 
xref:enterprise-integration-patterns.adoc[EIP
 patterns] by getting or setting a header on the xref:message.adoc[Message].
 
 When working with the xref:ROOT:jms-component.adoc[JMS]
-components the correlation identifier header is called
+components, the correlation identifier header is called
 *JMSCorrelationID*, and they handle the correlation automatically.
 
-Other messaging systems, such as 
xref:ROOT:spring-rabbitmq-component.adoc[Spring RabbitMQ] also handles this 
automatic,
-and you should generally not have a need for using custom correlation IDs with 
these systems.
+Other messaging systems, such as 
xref:ROOT:spring-rabbitmq-component.adoc[Spring RabbitMQ],
+also handle this automatically.
+In general, you should not have a need for using custom correlation IDs with 
these systems.
 
 image::eip/CorrelationIdentifierSolution.gif[image]
 
 You can use your own correlation identifier to any
 message exchange to help correlate messages together to a single
-conversation (or business process). For example if you need to correlation 
messages when using web services.
+conversation (or business process).
+For example, if you need to correlation messages when using web services.
 
 The use of a correlation identifier is key to working with 
xref:others:tracing.adoc[Distributed Tracing]
 and be useful when using xref:manual::tracer.adoc[Tracer] messages to log,
@@ -26,8 +28,8 @@ or testing with simulation or canned data such as with the 
xref:ROOT:mock-compon
 
 == EIPs using correlation identifiers
 
-Some xref:enterprise-integration-patterns.adoc[EIP] patterns will spin off a 
sub message, and in
-those cases, Camel will add a correlation id on the
+Some xref:enterprise-integration-patterns.adoc[EIP] patterns will spin off a 
sub message.
+In those cases, Camel will add a correlation id on the
 xref:manual::exchange.adoc[Exchange] as a property with they key
 `Exchange.CORRELATION_ID`, which links back to the source
 xref:manual::exchange.adoc[Exchange] and its exchange id.



(camel) 17/19: CAMEL-20459: documentation fixes for the event message EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit fb4ed6ca860316bddf538b9fca815f583d782d10
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 13:29:34 2024 +0100

CAMEL-20459: documentation fixes for the event message EIP.

Signed-off-by: Otavio R. Piske 
---
 .../src/main/docs/modules/eips/pages/event-message.adoc  | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/event-message.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/event-message.adoc
index 8cf11c86ed0..02a74f06437 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/event-message.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/event-message.adoc
@@ -20,7 +20,8 @@ The default behaviour of many 
xref:ROOT:index.adoc[Components] is `InOnly`
 such as for xref:ROOT:jms-component.adoc[JMS], 
xref:ROOT:jms-component.adoc[File] or
 xref:ROOT:seda-component.adoc[SEDA].
 
-Some components support both `InOnly` and `InOut` and act accordingly. For 
example the xref:ROOT:jms-component.adoc[JMS]
+Some components support both `InOnly` and `InOut` and act accordingly.
+For example, the xref:ROOT:jms-component.adoc[JMS]
 can send messages as one-way (`InOnly`) or use request/reply messaging 
(`InOut`).
 
 TIP: See the related xref:requestReply-eip.adoc[Request Reply] message.
@@ -36,7 +37,7 @@ the pattern property.
 foo:bar?exchangePattern=InOnly
 
 
-IMPORTANT: This is only possible on endpoints used by consumers (i.e. in 
``).
+IMPORTANT: This is only possible on endpoints used by consumers (i.e., in 
``).
 
 In the example below the message will be forced as an event message as the 
consumer
 is in `InOnly` mode.
@@ -109,14 +110,14 @@ NOTE: Using `setExchangePattern` to change the 
xref:manual::exchange-pattern.ado
 is often only used in special use-cases where you must
 force to be using either `InOnly` or `InOut` mode when using components that 
support both modes (such as messaging components like ActiveMQ, JMS, RabbitMQ 
etc.)
 
-== JMS component and InOnly vs InOut
+== JMS component and InOnly vs. InOut
 
 When consuming messages from xref:ROOT:jms-component.adoc[JMS] a Request Reply 
is
 indicated by the presence of the `JMSReplyTo` header. This means the JMS 
component automatic
 detects whether to use `InOnly` or `InOut` in the consumer.
 
 Likewise, the JMS producer will check the current 
xref:manual::exchange-pattern.adoc[Exchange Pattern]
-on the xref:manual::exchange.adoc[Exchange] to know whether to use `InOnly` or 
`InOut` mode (i.e. one-way vs request/reply messaging)
+on the xref:manual::exchange.adoc[Exchange] to know whether to use `InOnly` or 
`InOut` mode (i.e., one-way vs. request/reply messaging)
 
 
 == Other Implementation Details



(camel) 19/19: CAMEL-20459: documentation fixes for the fail-over EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 27e97a01f86105f1d6b7d7fe9cf341b8e3fbb670
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 13:36:13 2024 +0100

CAMEL-20459: documentation fixes for the fail-over EIP.

Signed-off-by: Otavio R. Piske 
---
 .../main/docs/modules/eips/pages/failover-eip.adoc | 47 ++
 1 file changed, 31 insertions(+), 16 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/failover-eip.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/failover-eip.adoc
index 9842611ecd5..f83f1cbc4dc 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/failover-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/failover-eip.adoc
@@ -6,7 +6,7 @@
 :supportlevel: Stable
 :tabs-sync-option:
 
-This EIP allows using fail-over (in case of failures the exchange will be 
tried on the next endpoint)
+This EIP allows using fail-over (in case of failures, the exchange will be 
tried on the next endpoint)
 with the xref:loadBalance-eip.adoc[Load Balancer] EIP.
 
 == Options
@@ -23,8 +23,13 @@ include::partial$eip-exchangeProperties.adoc[]
 
 == Example
 
-In the example below calling the three http services is done with the load 
balancer.
+In the example below, calling the three http services is done with the load 
balancer:
 
+[tabs]
+
+
+Java::
++
 [source,java]
 
 from("direct:start")
@@ -35,8 +40,8 @@ from("direct:start")
 .end();
 
 
-In XML you'll have a route like this:
-
+XML::
++
 [source,xml]
 
 
@@ -50,9 +55,11 @@ In XML you'll have a route like this:
 
 
 
-In the default mode the fail-over load balancer will always start with the 
first processor (i.e. "http:service1").
+
+
+In the default mode, the fail-over load balancer will always start with the 
first processor (i.e., "http:service1").
 And in case this fails, then try the next, until either it succeeded or all of 
them failed.
-If all failed then Camel will throw the caused exception which means the 
Exchange is failed.
+If all failed, then Camel will throw the caused exception which means the 
Exchange is failed.
 
 === Using round-robin mode
 
@@ -77,10 +84,11 @@ from("direct:start")
 .failover(10, false, true)
 
 
-Where `10` is the maximum failover attempts, And `false` is a special feature
-related to inheriting error handler. The last parameter `true` is to use round 
robin mode.
+Where `10` is the maximum fail over attempts, And `false` is a special feature
+related to inheriting error handler.
+The last parameter `true` is to use round-robin mode.
 
-In XML it is straightforward as shown:
+In XML, it is straightforward as shown:
 
 [source,xml]
 
@@ -100,15 +108,20 @@ In XML it is straightforward as shown:
 The sticky mode is used for remember the last known good endpoint, so the next 
exchange
 will start from there, instead from the beginning.
 
-For example support that http:service1 is down, and that service2 is up.
+For example, support that http:service1 is down, and that service2 is up.
 With sticky mode enabled, then Camel will keep starting from service2 until it
 fails, and then try service3.
 
-If sticky mode is not enabled (default) then Camel will always start from the 
beginning, which
+If sticky mode is not enabled (it's disabled by default), then Camel will 
always start from the beginning, which
 means calling service1.
 
-Setting sticky mode in Java DSL is not _pretty_ as there are four parameters:
+[tabs]
+
 
+Java::
++
+Setting sticky mode in Java DSL is not _pretty_ as there are four parameters.
++
 [source,java]
 
 from("direct:start")
@@ -118,11 +131,11 @@ from("direct:start")
 .to("http:service3")
 .end();
 
++
+NOTE: The last `true` argument is to enable sticky mode.
 
-The last `true` is to enable sticky mode.
-
-In XML it is straightforward as shown:
-
+XML::
++
 [source,xml]
 
 
@@ -136,6 +149,8 @@ In XML it is straightforward as shown:
 
 
 
+
+
 === Fail-over on specific exceptions
 
 The fail-over load balancer can be configured to only apply for a specific set 
of exceptions.



(camel) 14/19: CAMEL-20459: documentation fixes for the dynamic router EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 00cbc0605584cb752b358b89fb1e22dbaa50e2b2
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 13:21:37 2024 +0100

CAMEL-20459: documentation fixes for the dynamic router EIP.

Signed-off-by: Otavio R. Piske 
---
 .../src/main/docs/modules/eips/pages/dynamicRouter-eip.adoc   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/dynamicRouter-eip.adoc
 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/dynamicRouter-eip.adoc
index 60c3ae35435..2fc2cc9d379 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/dynamicRouter-eip.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/dynamicRouter-eip.adoc
@@ -136,7 +136,7 @@ public String slip(String body, @ExchangeProperties 
Map properti
 int invoked = 0;
 Object current = properties.get("invoked");
 if (current != null) {
-invoked = Integer.valueOf(current.toString());
+invoked = Integer.parseInt(current.toString());
 }
 invoked++;
 // and store the state back on the properties
@@ -179,7 +179,7 @@ public class MyDynamicRouter {
 @Consume(uri = "activemq:foo")
 @DynamicRouter
 public String route(@XPath("/customer/id") String customerId, 
@Header("Location") String location, Document body) {
-// query a database to find the best match of the endpoint based on 
the input parameters
+// Query a database to find the best match of the endpoint based on 
the input parameters
 // return the next endpoint uri, where to go. Return null to indicate 
the end.
 }
 }



(camel) 01/19: CAMEL-20459: documentation fixes for the circuit breaker EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 7838ec81e5847054441f7425c50426cf7172289c
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 11:38:52 2024 +0100

CAMEL-20459: documentation fixes for the circuit breaker EIP.

Signed-off-by: Otavio R. Piske 
---
 .../src/main/docs/modules/eips/pages/circuitBreaker-eip.adoc | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/circuitBreaker-eip.adoc
 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/circuitBreaker-eip.adoc
index b37c8da4102..8deb8758a53 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/circuitBreaker-eip.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/circuitBreaker-eip.adoc
@@ -16,11 +16,11 @@ image::eip/CircuitBreaker.png[image]
 
 The states are as follows:
 
-* *Closed* — When operating successfully.
-* *Open* — When failure is detected, and the breaker opens to short-circuit 
and fail
+* *Closed*: When operating successfully.
+* *Open*: When failure is detected, and the breaker opens to short-circuit and 
fails
   fast. In this state, the circuit breaker avoids invoking the protected 
operation and
-  avoids putting additional load on the struggling service.
-* *Half Open* — After a short period in the open state, an operation is 
attempted to
+  avoids putting the additional load on the struggling service.
+* *Half-Open*: After a short period in the open state, an operation is 
attempted to
   see whether it can complete successfully, and depending on the outcome, it 
will
   transfer to either open or closed state.
 
@@ -79,5 +79,5 @@ XML::
 
 Camel provides two implementations of this pattern:
 
-* xref:resilience4j-eip.adoc[Resilience4j] - Using the Resilience4j 
implementation
-* xref:fault-tolerance-eip.adoc[Fault Tolerance] - Using the MicroProfile 
Fault Tolerance implementation
+* xref:resilience4j-eip.adoc[Resilience4j]: Using the Resilience4j 
implementation
+* xref:fault-tolerance-eip.adoc[Fault Tolerance]: Using the MicroProfile Fault 
Tolerance implementation



(camel) 13/19: CAMEL-20459: documentation fixes for the delay EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit d9331f40b4e489107331b7447a6d24e951b78af6
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 13:18:09 2024 +0100

CAMEL-20459: documentation fixes for the delay EIP.

Signed-off-by: Otavio R. Piske 
---
 .../src/main/docs/modules/eips/pages/delay-eip.adoc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/delay-eip.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/delay-eip.adoc
index 56bfd35c5f2..506693696ae 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/delay-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/delay-eip.adoc
@@ -80,7 +80,7 @@ Note that delay creates its own block, so some DSLs 
(including Java) require the
 
 The delayed value can be a dynamic xref:manual::expression.adoc[Expression].
 
-For example to delay a random between 1 and 5 seconds, we can use
+For example, to delay a random between 1 and 5 seconds, we can use
 the xref:languages:simple-language.adoc[Simple] language:
 
 [tabs]
@@ -174,7 +174,7 @@ XML::

1000

-   
+   
 
 
 
@@ -190,6 +190,6 @@ YAML::
 constant: 1000
   asyncDelayed: true
   - to:
-  uri: activemq:aDealyedQueue
+  uri: activemq:aDelayedQueue
 
 



(camel) 16/19: CAMEL-20459: documentation fixes for the EIP summary page

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit b26db142a34170c57415d155243fddf967b953e2
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 13:27:45 2024 +0100

CAMEL-20459: documentation fixes for the EIP summary page

Signed-off-by: Otavio R. Piske 
---
 .../eips/pages/enterprise-integration-patterns.adoc  | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/enterprise-integration-patterns.adoc
 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/enterprise-integration-patterns.adoc
index 67aa04301fe..380954d5ae4 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/enterprise-integration-patterns.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/enterprise-integration-patterns.adoc
@@ -99,7 +99,7 @@ for?
 
 a|image::eip/MessageExpirationIcon.gif[image]
 |xref:message-expiration.adoc[Message Expiration] |How can a sender indicate
-when a message should be considered stale and thus shouldn’t be processed?
+when a message should be considered stale and thus shouldn't be processed?
 
 |===
 
@@ -108,7 +108,7 @@ when a message should be considered stale and thus 
shouldn’t be processed?
 [width="100%",cols="10%,10%,80%",]
 |===
 a|image::eip/ContentBasedRouterIcon.gif[image]
-|xref:choice-eip.adoc[Content Based Router] |How do we handle
+|xref:choice-eip.adoc[Content-Based Router] |How do we handle
 a situation where the implementation of a single logical function (e.g.,
 inventory check) is spread across multiple physical systems?
 
@@ -132,7 +132,7 @@ different way?
 
 a|image::eip/AggregatorIcon.gif[image]
 |xref:aggregate-eip.adoc[Aggregator] |How do we combine the results of
-individual, but related messages so that they can be processed as a
+individual, but related, messages so that they can be processed as a
 whole?
 
 a|image::eip/ResequencerIcon.gif[image]
@@ -179,7 +179,7 @@ a|image::eip/WireTap.gif[image]
 in a given period to avoid downstream route does not get overloaded?
 
 a|image::eip/MessagingAdapterIcon.gif[image]
-|xref:kamelet-eip.adoc[Kamelet] | How can I call Kamelets (route templates).
+|xref:kamelet-eip.adoc[Kamelet] | How can I call Kamelets (route templates)?
 
 a|image::eip/MessageExpirationIcon.gif[image]
 |xref:delay-eip.adoc[Delayer] |How can I delay the sending of a message?
@@ -189,10 +189,10 @@ a|image::eip/MessageDispatcherIcon.gif[image]
 number of endpoints?
 
 a|image::eip/MessageDispatcherIcon.gif[image]
-|xref:circuitBreaker-eip.adoc[Circuit Breaker] |How can I stop to call an 
external service if the service is broken?
+|xref:circuitBreaker-eip.adoc[Circuit Breaker] |How can I stop calling an 
external service if the service is broken?
 
 a|image::eip/MessageExpirationIcon.gif[image]
-|xref:stop-eip.adoc[Stop] |How can I stop continue routing a message?
+|xref:stop-eip.adoc[Stop] |How can I stop to continue routing a message?
 
 a|image::eip/MessagingGatewayIcon.gif[image]
 |xref:serviceCall-eip.adoc[Service Call] |How can I call a remote service in a 
distributed system
@@ -221,11 +221,11 @@ required data items available?
 
 a|image::eip/ContentFilterIcon.gif[image]
 |xref:content-filter-eip.adoc[Content Filter] |How do you simplify dealing
-with a large message, when you are interested only in a few data items?
+with a large message when you are interested only in a few data items?
 
 a|image::eip/StoreInLibraryIcon.gif[image]
 |xref:claimCheck-eip.adoc[Claim Check] |How can we reduce the data volume
-of message sent across the system without sacrificing information
+of a message sent across the system without sacrificing information
 content?
 
 a|image::eip/NormalizerIcon.gif[image]
@@ -282,7 +282,7 @@ receiver deal with duplicate messages?
 
 a|image::eip/MessageFilterIcon.gif[image]
 |xref:resume-strategies.adoc[Resumable Consumer] |How can a message
-receiver resume from last known offset?
+receiver resume from the last known offset?
 
 a|image::eip/TransactionalClientIcon.gif[image]
 |xref:transactional-client.adoc[Transactional Client] |How can a client
@@ -304,7 +304,7 @@ and via non-messaging techniques?
 |===
 a|image::eip/ControlBusIcon.gif[image]
 |xref:ROOT:controlbus-component.adoc[ControlBus] |How can we effectively 
administer a
-messaging system that is distributed across multiple platforms and a
+messaging system distributed across multiple platforms and a
 wide geographic area?
 
 a|image::eip/DetourIcon.gif[image]



(camel) 06/19: CAMEL-20459: documentation fixes for the content filter EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit ddaa3b07fb1f747b4d3c7fe86e9f55ea339e0926
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 11:56:26 2024 +0100

CAMEL-20459: documentation fixes for the content filter EIP.

Signed-off-by: Otavio R. Piske 
---
 .../src/main/docs/modules/eips/pages/content-filter-eip.adoc  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/content-filter-eip.adoc
 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/content-filter-eip.adoc
index 63bfdd7442a..615783817b0 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/content-filter-eip.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/content-filter-eip.adoc
@@ -17,7 +17,7 @@ image::eip/ContentFilter.gif[image]
 
 == Message Content filtering using a Processor
 
-In this example we add our own xref:manual::processor.adoc[Processor] using
+In this example, we add our own xref:manual::processor.adoc[Processor] using
 explicit Java to filter the message:
 
 [source,java]
@@ -37,7 +37,7 @@ from("direct:start")
 == Message Content filtering using a Bean EIP
 
 We can use xref:bean-eip.adoc[Bean EIP] to use any Java
-method on any bean to act as content filter:
+method on any bean to act as a content filter:
 
 [tabs]
 



(camel) 07/19: CAMEL-20459: documentation fixes for the convertBodyTo EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit c67a9aebf60f0c91a4829766269f899105bf0763
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 11:57:13 2024 +0100

CAMEL-20459: documentation fixes for the convertBodyTo EIP.

Signed-off-by: Otavio R. Piske 
---
 .../src/main/docs/modules/eips/pages/convertBodyTo-eip.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/convertBodyTo-eip.adoc
 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/convertBodyTo-eip.adoc
index d6ea084576f..13f0ae43b35 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/convertBodyTo-eip.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/convertBodyTo-eip.adoc
@@ -12,7 +12,7 @@ The ConvertBodyTo EIP allows you to transform the message 
body to a different ty
 include::partial$eip-options.adoc[]
 // eip options: END
 
-NOTE: The type is a FQN classname (fully qualified), so for example 
`java.lang.String`, `com.foo.MyBean` etc.
+NOTE: The type is a FQN class name (fully qualified), so for example 
`java.lang.String`, `com.foo.MyBean` etc.
 However, Camel has shorthand for common Java types, most noticeable `String` 
can be used instead of `java.lang.String`.
 You can also use `byte[]` for a byte array.
 



(camel) 12/19: CAMEL-20459: documentation fixes for the dead letter channel EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e11dbf0ae44df0a67283968e01102d5072261071
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 13:15:51 2024 +0100

CAMEL-20459: documentation fixes for the dead letter channel EIP.

Signed-off-by: Otavio R. Piske 
---
 .../modules/eips/pages/dead-letter-channel.adoc| 159 +++--
 1 file changed, 82 insertions(+), 77 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/dead-letter-channel.adoc
 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/dead-letter-channel.adoc
index b8872c20aa8..90c33144433 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/dead-letter-channel.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/dead-letter-channel.adoc
@@ -5,14 +5,14 @@ 
http://www.enterpriseintegrationpatterns.com/DeadLetterChannel.html[Dead
 Letter Channel] from the xref:enterprise-integration-patterns.adoc[EIP
 patterns] using the
 
https://www.javadoc.io/doc/org.apache.camel/camel-core-processor/current/org/apache/camel/processor/errorhandler/DeadLetterChannel.html[DeadLetterChannel]
-processor which is an xref:manual::error-handler.adoc[Error Handler].
+ processor, which is an xref:manual::error-handler.adoc[Error Handler].
 
 image::eip/DeadLetterChannelSolution.gif[image]
 
 The Dead Letter Channel is an xref:manual::error-handler.adoc[Error Handler]
 that implements the principles from the Dead Letter Channel EIP.
-From the illustration above we can see the pattern is that if a message cannot 
be processed or fails during sending, it should be moved to a dead letter queue.
-The dead letter queue, is based on a Camel
+From the illustration above, we can see the pattern is that if a message 
cannot be processed or fails during sending, it should be moved to a dead 
letter queue.
+The dead letter queue is based on a Camel
 xref:message-endpoint.adoc[Endpoint], allowing you to use any of the many 
Camel components, such as a file system, database, or a log.
 
 The Dead Letter Channel is similar to the default error handler, but with the 
following differences:
@@ -27,22 +27,28 @@ The Dead Letter Channel is similar to the default error 
handler, but with the fo
 When using the dead letter channel error handler, you must configure the dead 
letter queue as an endpoint, so the handler knows where to move the failed 
messages.
 This is done a bit differently in the Java DSL and XML DSL.
 
-For example, here’s how to log the message at `ERROR` level in Java DSL:
+For example, here’s how to log the message at `ERROR` level:
 
+[tabs]
+
+Java::
++
 [source,java]
 
 errorHandler(deadLetterChannel("log:dead?level=ERROR"));
 
 
-And in Spring XML
-
+Spring XML::
++
 [source,xml]
 
 
 
 
-Pay attention to Spring XML DSL, the type attribute is used to declare which 
error handler to use, here its `DeadLetterChannel`.
+
+
+Pay attention to Spring XML DSL. The type attribute is used to declare which 
error handler to use, here its `DeadLetterChannel`.
 And in XML the `` must be configured with an id.
 The id must then be enabled on either the `` (global scope), or 
per route that should use this error handler.
 
@@ -66,8 +72,8 @@ which means this error handler is used globally. You can 
override this per route
 individual routes used another error handler.
 
 NOTE: The DSLs is planned to be improved in the near future to have a unified
-way of configuring error handling across all DSLs, with 
xref:manual::route-configuration.adoc[Route Configuration].
-When fully implemented then configuring error handler in Java and XML DSL 
would be much more similar than currently.
+way of configuring error handling across all DSLs with 
xref:manual::route-configuration.adoc[Route Configuration].
+When fully implemented, then configuring error handler in Java and XML DSL 
would be much more similar than currently.
 
 === Redelivery
 
@@ -81,41 +87,41 @@ You can customize things like:
 
 * how many times a message is attempted to be redelivered before it is 
considered a failure and sent to the dead letter channel
 * the initial redelivery timeout
-* using exponential backoff (i.e. the time between retries increases using a 
backoff multiplier)
+* using exponential backoff (i.e., the time between retries increases using a 
backoff multiplier)
 * whether to use collision avoidance to add some randomness to the timings
 * delay pattern
 * whether to allow redelivery during stopping/shutdown
 
-Only when all redelivery attempts have failed then the message is moved to the 
dead letter queue.
+Only when all redelivery attempts have failed, then the message is moved to 
the dead letter queue.
 
-=== Redelivery default values
+ Redelivery default values
 
 Redelivery is disabled by default.
 
 The default redeliver policy will use the following 

(camel) 03/19: CAMEL-20459: documentation fixes for the competing consumers EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 4a348b38506c3b6b0f6db4f6aa466f8b7ef4c825
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 11:50:25 2024 +0100

CAMEL-20459: documentation fixes for the competing consumers EIP.

Signed-off-by: Otavio R. Piske 
---
 .../modules/eips/pages/competing-consumers.adoc| 48 +++---
 1 file changed, 25 insertions(+), 23 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/competing-consumers.adoc
 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/competing-consumers.adoc
index 1b0b49a354b..65e0a8f2de2 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/competing-consumers.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/competing-consumers.adoc
@@ -11,15 +11,15 @@ For example from SEDA, JMS, Kafka, and various AWS 
components.
 image::eip/CompetingConsumers.gif[image]
 
 - xref:ROOT:seda-component.adoc[SEDA] for SEDA based concurrent processing 
using a thread pool
-- xref:ROOT:jms-component.adoc[JMS] for distributed SEDA based concurrent 
processing with queues which support reliable load balancing, failover and 
clustering.
+- xref:ROOT:jms-component.adoc[JMS] for distributed SEDA-based concurrent 
processing with queues which support reliable load balancing, fail over, and 
clustering.
 
-For components which does not allow concurrent consumers, then Camel allows 
routeing from the consumer
+For components that do not allow concurrent consumers, then Camel allows 
routing from the consumer
 to a thread-pool which can then further process the message concurrently,
 which then simulates a _quasi like_ competing consumers.
 
 == Competing Consumers with JMS
 
-To enable Competing Consumers you just need to set the `concurrentConsumers` 
property on the JMS endpoint.
+To enable Competing Consumers, you need to set the `concurrentConsumers` 
property on the JMS endpoint.
 
 For example
 
@@ -60,11 +60,12 @@ YAML::
 == Competing Consumers with Thread Pool
 
 You can simulate competing consumers by using a thread pool which then 
continue processing the messages concurrently.
-Then the single thread consumer can quickly continue and pickup new messages 
to process and offload them to the thread-pool
+Then the single thread consumer can quickly continue
+and pick up new messages to process and offload them to the thread-pool
 (and its task queue).
 
-Suppose we have this simple route where we poll a folder for new files,
-process the files and afterwards move the files to a backup folder when 
complete.
+Suppose we have this route where we poll a folder for new files,
+process the files and afterward move the files to a backup folder when 
complete.
 
 [tabs]
 
@@ -98,23 +99,24 @@ YAML::
 
 
 
-The route is synchronous and there is only a single consumer running at any 
given time.
+The route is synchronous, and there is only a single consumer running at any 
given time.
 This scenario is well known, and it doesn't affect thread safety as we only 
have one active thread
 involved at any given time.
 
 Now imagine that the inbox folder is filled with filers quicker than we can 
process.
 So we want to speed up this process. How can we do this?
 
-Well we could try adding a 2nd route with the same route path.
-Well that doesn't work so well as we have competing consumers for the same 
files.
-That requires however that we use file locking, so we won't have two consumers 
compete for the same file.
-By default, Camel support this with its file locking option on the file 
component.
+Well, we could try adding a second route with the same route path.
+That doesn't work so well as we have competing consumers for the same files.
+That requires, however, that we use file locking, so we won't have two 
consumers compete for the same file.
+By default, Camel supports this with its file locking option on the file 
component.
 
-What if the component doesn't support this, or it's not possible to add a 2nd 
consumer
-for the same endpoint? And yes it's _a bit of a hack_, and the route logic 
code is duplicated.
-And what if we need more, then we need to add a 3rd, a 4th and so on.
+What if the component doesn't support this, or it's not possible to add a 
second consumer
+for the same endpoint?
+And yes, it's _a bit of a hack_, and the route logic code is duplicated.
+And what if we need more, then we need to add a third, a fourth and so on.
 
-What if the processing of the file itself is the bottleneck, i.e. the 
`calculateBean` is slow?
+What if the processing of the file itself is the bottleneck, i.e., the 
`calculateBean` is slow?
 So how can we process messages with this bean concurrently?
 
 We can use the xref:threads-eip.adoc[Threads EIP], so if we insert it in the 
route we get:
@@ -160,19 +162,19 @@ it should use a thread pool with 

(camel) 18/19: CAMEL-20459: documentation fixes for the event-driven consumer EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit efea68a14baa4cda1390441e076897c7495181f1
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 13:30:06 2024 +0100

CAMEL-20459: documentation fixes for the event-driven consumer EIP.

Signed-off-by: Otavio R. Piske 
---
 .../src/main/docs/modules/eips/pages/eventDrivenConsumer-eip.adoc   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/eventDrivenConsumer-eip.adoc
 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/eventDrivenConsumer-eip.adoc
index 88782c6877e..c9653246170 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/eventDrivenConsumer-eip.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/eventDrivenConsumer-eip.adoc
@@ -6,7 +6,7 @@ 
http://www.enterpriseintegrationpatterns.com/EventDrivenConsumer.html[Event Driv
 from the
 xref:enterprise-integration-patterns.adoc[EIP patterns].
 
-The default consumer model is event based (i.e. asynchronous)
+The default consumer model is event-based (i.e., asynchronous)
 as this means that the Camel container can then manage pooling,
 threading and concurrency for you in a declarative manner.
 



(camel) 15/19: CAMEL-20459: documentation fixes for the enrich EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 34d19b36d59aad4814d79ed11c72c318de6a37f1
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 13:24:51 2024 +0100

CAMEL-20459: documentation fixes for the enrich EIP.

Signed-off-by: Otavio R. Piske 
---
 .../main/docs/modules/eips/pages/enrich-eip.adoc   | 24 --
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/enrich-eip.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/enrich-eip.adoc
index 667590b68f1..0cf48fbed87 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/enrich-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/enrich-eip.adoc
@@ -23,13 +23,14 @@ In Camel the Content Enricher can be done in several ways:
 The most natural Camel approach is using xref:enrich-eip.adoc[Enrich] EIP,
 which comes as two kinds:
 
-* xref:enrich-eip.adoc[Enrich] EIP - This is the most common content enricher 
that uses a `Producer` to obtain the data.
-It is usually used for xref:requestReply-eip.adoc[Request Reply] messaging, 
for instance to invoke an external web service.
+* xref:enrich-eip.adoc[Enrich] EIP: This is the most common content enricher 
that uses a `Producer` to obtain the data.
+It is usually used for xref:requestReply-eip.adoc[Request Reply] messaging,
+for instance, to invoke an external web service.
 
-* xref:pollEnrich-eip.adoc[Poll Enrich] EIP - Uses a 
xref:polling-consumer.adoc[Polling
+* xref:pollEnrich-eip.adoc[Poll Enrich] EIP: Uses a 
xref:polling-consumer.adoc[Polling
 Consumer] to obtain the additional data. It is usually used for
-xref:event-message.adoc[Event Message] messaging, for instance to read a
-file or download a xref:ROOT:ftp-component.adoc[FTP] file.
+xref:event-message.adoc[Event Message] messaging, for instance, to read a
+file or download one using xref:ROOT:ftp-component.adoc[FTP].
 
 NOTE: This page documents the Enrich EIP.
 
@@ -47,11 +48,12 @@ include::partial$eip-exchangeProperties.adoc[]
 
 Enrich EIP is the most common content enricher that uses a `Producer` to 
obtain the data.
 
-The content enricher (`enrich`) retrieves additional data from a _resource 
endpoint_ in order to enrich an incoming message (contained in the _original 
exchange_).
+The content enricher (`enrich`) retrieves additional data from a _resource 
endpoint_
+to enrich an incoming message (contained in the _original exchange_).
 
 An `AggregationStrategy` is used to combine the original exchange and the 
_resource exchange_. The first parameter of the 
`AggregationStrategy.aggregate(Exchange, Exchange)` method corresponds to the 
original exchange, the second parameter the resource exchange.
 
-Here's an example for implementing an `AggregationStrategy`, which merges the 
two data together
+Here's an example for implementing an `AggregationStrategy`, which merges the 
two data
 as a `String` with colon separator:
 
 [source,java]
@@ -129,7 +131,7 @@ YAML::
 === Aggregation Strategy is optional
 
 The aggregation strategy is optional.
-If not provided then Camel will just use the result exchange as the result.
+If not provided, then Camel will just use the result exchange as the result.
 
 The following example:
 
@@ -212,7 +214,7 @@ YAML::
 
 === Using dynamic uris
 
-Both `enrich` and `pollEnrich` supports using dynamic uris computed based on 
information from the current Exchange. For example to enrich from a HTTP 
endpoint where the header with key orderId is used as part of the content-path 
of the HTTP url:
+Both `enrich` and `pollEnrich` supports using dynamic uris computed based on 
information from the current Exchange. For example, to enrich from a HTTP 
endpoint where the header with key orderId is used as part of the content-path 
of the HTTP url:
 
 [tabs]
 
@@ -255,12 +257,12 @@ YAML::
 
 TIP: See the `cacheSize` option for more details on _how much cache_ to use 
depending on how many or few unique endpoints are used.
 
-=== Using out of the box Aggregation Strategies
+=== Using out-of-the-box Aggregation Strategies
 
 The `org.apache.camel.builder.AggregationStrategies` is a builder that can
 be used for creating commonly used aggregation strategies without having to 
create a class.
 
-For example the `ExampleAggregationStrategy` from previously can be built as 
follows:
+For example, the `ExampleAggregationStrategy` from previously can be built as 
follows:
 
 [source,java]
 



(camel) branch main updated (214ebc1f937 -> 27e97a01f86)

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


from 214ebc1f937 CAMEL-20459: documentation fixes for the choice EIP.
 new 7838ec81e58 CAMEL-20459: documentation fixes for the circuit breaker 
EIP.
 new d12359d5de9 CAMEL-20459: documentation fixes for the claim check EIP.
 new 4a348b38506 CAMEL-20459: documentation fixes for the competing 
consumers EIP.
 new 04d29183341 CAMEL-20459: documentation fixes for the composed message 
processor EIP.
 new 887d4408950 CAMEL-20459: documentation fixes for the content enricher 
EIP.
 new ddaa3b07fb1 CAMEL-20459: documentation fixes for the content filter 
EIP.
 new c67a9aebf60 CAMEL-20459: documentation fixes for the convertBodyTo EIP.
 new 5c780d53439 CAMEL-20459: documentation fixes for the convertHeaderTo 
EIP.
 new bf12809ab62 CAMEL-20459: documentation fixes for the convertVariableTo 
EIP.
 new 16aaac9e503 CAMEL-20459: documentation fixes for the correlation 
identifier EIP.
 new a424cdef52c CAMEL-20459: documentation fixes for the custom load 
balancer EIP.
 new e11dbf0ae44 CAMEL-20459: documentation fixes for the dead letter 
channel EIP.
 new d9331f40b4e CAMEL-20459: documentation fixes for the delay EIP.
 new 00cbc060558 CAMEL-20459: documentation fixes for the dynamic router 
EIP.
 new 34d19b36d59 CAMEL-20459: documentation fixes for the enrich EIP.
 new b26db142a34 CAMEL-20459: documentation fixes for the EIP summary page
 new fb4ed6ca860 CAMEL-20459: documentation fixes for the event message EIP.
 new efea68a14ba CAMEL-20459: documentation fixes for the event-driven 
consumer EIP.
 new 27e97a01f86 CAMEL-20459: documentation fixes for the fail-over EIP.

The 19 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../modules/eips/pages/circuitBreaker-eip.adoc |  12 +-
 .../docs/modules/eips/pages/claimCheck-eip.adoc|  28 ++--
 .../modules/eips/pages/competing-consumers.adoc|  48 ---
 .../eips/pages/composed-message-processor.adoc |   8 +-
 .../docs/modules/eips/pages/content-enricher.adoc  |  20 +--
 .../modules/eips/pages/content-filter-eip.adoc |   4 +-
 .../docs/modules/eips/pages/convertBodyTo-eip.adoc |   2 +-
 .../modules/eips/pages/convertHeaderTo-eip.adoc|  14 +-
 .../modules/eips/pages/convertVariableTo-eip.adoc  |  14 +-
 .../modules/eips/pages/correlation-identifier.adoc |  14 +-
 .../modules/eips/pages/customLoadBalancer-eip.adoc |   2 +-
 .../modules/eips/pages/dead-letter-channel.adoc| 159 +++--
 .../main/docs/modules/eips/pages/delay-eip.adoc|   6 +-
 .../docs/modules/eips/pages/dynamicRouter-eip.adoc |   4 +-
 .../main/docs/modules/eips/pages/enrich-eip.adoc   |  24 ++--
 .../pages/enterprise-integration-patterns.adoc |  20 +--
 .../docs/modules/eips/pages/event-message.adoc |   9 +-
 .../eips/pages/eventDrivenConsumer-eip.adoc|   2 +-
 .../main/docs/modules/eips/pages/failover-eip.adoc |  47 +++---
 19 files changed, 233 insertions(+), 204 deletions(-)



(camel) 08/19: CAMEL-20459: documentation fixes for the convertHeaderTo EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 5c780d5343980dd1255034825c78e45ad4589853
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 12:00:41 2024 +0100

CAMEL-20459: documentation fixes for the convertHeaderTo EIP.

Signed-off-by: Otavio R. Piske 
---
 .../main/docs/modules/eips/pages/convertHeaderTo-eip.adoc  | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/convertHeaderTo-eip.adoc
 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/convertHeaderTo-eip.adoc
index 21562f9881c..5bb2b185905 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/convertHeaderTo-eip.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/convertHeaderTo-eip.adoc
@@ -12,7 +12,7 @@ The ConvertHeaderTo EIP allows you to transform message 
header to a different ty
 include::partial$eip-options.adoc[]
 // eip options: END
 
-NOTE: The type is a FQN classname (fully qualified), so for example 
`java.lang.String`, `com.foo.MyBean` etc.
+NOTE: The type is a FQN class name (fully qualified), so for example 
`java.lang.String`, `com.foo.MyBean` etc.
 However, Camel has shorthand for common Java types, most noticeable `String` 
can be used instead of `java.lang.String`.
 You can also use `byte[]` for a byte array.
 
@@ -24,7 +24,7 @@ include::partial$eip-exchangeProperties.adoc[]
 
 == Example
 
-For example to convert the foo header to `String`:
+For example, to convert the foo header to `String`:
 
 [tabs]
 
@@ -113,12 +113,12 @@ The ConvertHeaderTo supports using 
xref:components:languages:simple-language.ado
 
 Suppose you have multiple headers:
 
-- region
-- emea
-- na
-- pacific
+- `region`
+- `emea`
+- `na`
+- `pacific`
 
-And that region points to either ema, na or pacific which has some order 
details.
+And that region points to either `emea`, `na` or `pacific`, which has some 
order details.
 Then you can use dynamic header to convert the header of choice. Now suppose 
that the region header has value `emea`:
 
 [tabs]



(camel) 09/19: CAMEL-20459: documentation fixes for the convertVariableTo EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit bf12809ab62aecd8de1a61f1e54707c737e0d497
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 12:04:14 2024 +0100

CAMEL-20459: documentation fixes for the convertVariableTo EIP.

Signed-off-by: Otavio R. Piske 
---
 .../docs/modules/eips/pages/convertVariableTo-eip.adoc | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/convertVariableTo-eip.adoc
 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/convertVariableTo-eip.adoc
index f6e476c0ab2..ee276f4e54e 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/convertVariableTo-eip.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/convertVariableTo-eip.adoc
@@ -12,7 +12,7 @@ The ConvertVariableTo EIP allows you to convert a variable to 
a different type.
 include::partial$eip-options.adoc[]
 // eip options: END
 
-NOTE: The type is a FQN classname (fully qualified), so for example 
`java.lang.String`, `com.foo.MyBean` etc.
+NOTE: The type is a FQN class name (fully qualified), so for example 
`java.lang.String`, `com.foo.MyBean` etc.
 However, Camel has shorthand for common Java types, most noticeable `String` 
can be used instead of `java.lang.String`.
 You can also use `byte[]` for a byte array.
 
@@ -24,7 +24,7 @@ include::partial$eip-exchangeProperties.adoc[]
 
 == Example
 
-For example to convert the foo variable to `String`:
+For example, to convert the foo variable to `String`:
 
 [tabs]
 
@@ -113,12 +113,12 @@ The ConvertVariableTo supports using 
xref:components:languages:simple-language.a
 
 Suppose you have multiple variables:
 
-- region
-- emea
-- na
-- pacific
+- `region`
+- `emea`
+- `na`
+- `pacific`
 
-And that region points to either ema, na or pacific which has some order 
details.
+And that region points to either `emea`, `na` or `pacific` which has some 
order details.
 Then you can use dynamic variable to convert the header of choice. Now suppose 
that the region variable has value `emea`:
 
 [tabs]



(camel) 05/19: CAMEL-20459: documentation fixes for the content enricher EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 887d4408950f015b7e503f59dd064b3a87e1b200
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 11:55:23 2024 +0100

CAMEL-20459: documentation fixes for the content enricher EIP.

Signed-off-by: Otavio R. Piske 
---
 .../docs/modules/eips/pages/content-enricher.adoc| 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/content-enricher.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/content-enricher.adoc
index 5cb60fa2260..76d5d0cb513 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/content-enricher.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/content-enricher.adoc
@@ -22,7 +22,7 @@ The most natural Camel approach is using 
xref:enrich-eip.adoc[Enrich] EIP.
 
 You can consume a message from
 one destination, transform it with something like
-xref:ROOT:velocity-component.adoc[Velocity] or 
xref:ROOT:xquery-component.adoc[XQuery]
+xref:ROOT:velocity-component.adoc[Velocity] or 
xref:ROOT:xquery-component.adoc[XQuery],
 and then send it on to another destination.
 
 [tabs]
@@ -62,7 +62,8 @@ YAML::
 
 
 You can also enrich the message in Java DSL directly (using fluent builder) as 
an
-xref:manual::expression.adoc[Expression]. In the example below the message
+xref:manual::expression.adoc[Expression].
+In the example below, the message
 is enriched by appending ` World!` to the message body:
 
 [source,java]
@@ -88,7 +89,7 @@ xref:languages:simple-language.adoc[Simple] language:
 
 == Content enrichment using a Processor
 
-In this example we add our own xref:manual::processor.adoc[Processor] using
+In this example, we add our own xref:manual::processor.adoc[Processor] using
 explicit Java to enrich the message:
 
 [source,java]
@@ -149,12 +150,13 @@ YAML::
 
 Camel comes with two kinds of Content Enricher EIPs:
 
-* xref:enrich-eip.adoc[Enrich] EIP - This is the most common content enricher 
that uses a `Producer` to obtain the data.
-It is usually used for xref:requestReply-eip.adoc[Request Reply] messaging, 
for instance to invoke an external web service.
+* xref:enrich-eip.adoc[Enrich] EIP: This is the most common content enricher 
that uses a `Producer` to obtain the data.
+It is usually used for xref:requestReply-eip.adoc[Request Reply] messaging,
+for instance, to invoke an external web service.
 
-* xref:pollEnrich-eip.adoc[Poll Enrich] EIP - Uses a 
xref:polling-consumer.adoc[Polling
+* xref:pollEnrich-eip.adoc[Poll Enrich] EIP: Uses a 
xref:polling-consumer.adoc[Polling
 Consumer] to obtain the additional data. It is usually used for
-xref:event-message.adoc[Event Message] messaging, for instance to read a
-file or download a xref:ROOT:ftp-component.adoc[FTP] file.
+xref:event-message.adoc[Event Message] messaging, for instance, to read a
+file or download one using xref:ROOT:ftp-component.adoc[FTP].
 
-For more details see xref:enrich-eip.adoc[Enrich] EIP and 
xref:pollEnrich-eip.adoc[Poll Enrich] EIP.
+For more details, see xref:enrich-eip.adoc[Enrich] EIP and 
xref:pollEnrich-eip.adoc[Poll Enrich] EIP.



(camel) 11/19: CAMEL-20459: documentation fixes for the custom load balancer EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit a424cdef52cc45f32c4c2d34766069cd7fd2d1be
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 12:07:33 2024 +0100

CAMEL-20459: documentation fixes for the custom load balancer EIP.

Signed-off-by: Otavio R. Piske 
---
 .../src/main/docs/modules/eips/pages/customLoadBalancer-eip.adoc| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/customLoadBalancer-eip.adoc
 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/customLoadBalancer-eip.adoc
index 4736dffa007..1cf4c801202 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/customLoadBalancer-eip.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/customLoadBalancer-eip.adoc
@@ -60,7 +60,7 @@ XML::
 
 
 
-To implement a custom load balancer you can extend some support classes such 
as `LoadBalancerSupport` and `SimpleLoadBalancerSupport`.
+To implement a custom load balancer, you can extend some support classes such 
as `LoadBalancerSupport` and `SimpleLoadBalancerSupport`.
 The former supports the asynchronous routing engine, and the latter does not. 
Here is an example of a custom load balancer implementation:
 
 [source,java]



(camel) 04/19: CAMEL-20459: documentation fixes for the composed message processor EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 04d2918334107b9b5a3c9bed7e62bc5bb76aeb6d
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 11:52:34 2024 +0100

CAMEL-20459: documentation fixes for the composed message processor EIP.

Signed-off-by: Otavio R. Piske 
---
 .../main/docs/modules/eips/pages/composed-message-processor.adoc  | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/composed-message-processor.adoc
 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/composed-message-processor.adoc
index 8f55d3945aa..fe1d0d2cb7c 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/composed-message-processor.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/composed-message-processor.adoc
@@ -12,7 +12,7 @@ Use Composed Message Processor to process a composite message.
 The Composed Message Processor splits the message up, routes the sub-messages 
to the appropriate destinations
 and re-aggregates the responses back into a single message.
 
-With Camel this pattern is implemented by the xref:split-eip.adoc[Splitter]
+With Camel, this pattern is implemented by the xref:split-eip.adoc[Splitter]
 which has built-in aggregation to re-aggregate the responses back into a 
single message.
 
 == Example
@@ -20,7 +20,7 @@ which has built-in aggregation to re-aggregate the responses 
back into a single
 This example uses the xref:split-eip.adoc[Split] EIP as composed message 
processor to process each split message,
 aggregate and return a single combined response.
 
-The route and the code comments below explains how you can use the 
xref:split-eip.adoc[Split] EIP to
+The route and the code comments below explain how you can use the 
xref:split-eip.adoc[Split] EIP to
 split each message to sub-message which are processed individually and then 
combined back into
 a single response message via the custom `AggregationStrategy` 
(`MyOrderStrategy`), as the output from the Split EIP.
 
@@ -28,7 +28,7 @@ a single response message via the custom 
`AggregationStrategy` (`MyOrderStrategy
 
 // this routes starts from the direct:start endpoint
 // the body is then split based on @ separator
-// the splitter in Camel supports InOut as well and for that we need
+// the splitter in Camel supports InOut as well, and for that we need
 // to be able to aggregate what response we need to send back, so we provide 
our
 // own strategy with the class MyOrderStrategy.
 from("direct:start")
@@ -38,7 +38,7 @@ from("direct:start")
 // this is important to end the splitter route as we do not want to do 
more routing
 // on each split message
 .end()
-// after we have split and handled each message we want to send a single 
combined
+// after we have split and handled each message, we want to send a single 
combined
 // response back to the original caller, so we let this bean build it for 
us
 // this bean will receive the result of the aggregate strategy: 
MyOrderStrategy
 .to("bean:MyOrderService?method=buildCombinedResponse")



(camel) 02/19: CAMEL-20459: documentation fixes for the claim check EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit d12359d5de980bf4b043f24ef217eed1c2be0b18
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 11:43:17 2024 +0100

CAMEL-20459: documentation fixes for the claim check EIP.

Signed-off-by: Otavio R. Piske 
---
 .../docs/modules/eips/pages/claimCheck-eip.adoc| 28 +++---
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/claimCheck-eip.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/claimCheck-eip.adoc
index 2895645a36c..f736fab5190 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/claimCheck-eip.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/claimCheck-eip.adoc
@@ -30,13 +30,13 @@ include::partial$eip-exchangeProperties.adoc[]
 
 == Claim Check Operation
 
-When using this EIP you must specify the operation to use which can be of the 
following:
+When using this EIP, you must specify the operation to use which can be of the 
following:
 
-* *Get* - Gets (does not remove) the claim check by the given key.
-* *GetAndRemove* - Gets and removes the claim check by the given key.
-* *Set* - Sets a new (will override if key already exists) claim check with 
the given key.
-* *Push* - Sets a new claim check on the stack (does not use key).
-* *Pop* - Gets the latest claim check from the stack (does not use key).
+* `*Get*`: Gets (does not remove) the claim check by the given key.
+* `*GetAndRemove*`: Gets and removes the claim check by the given key.
+* `*Set*`: Sets a new (will override if key already exists) claim check with 
the given key.
+* `*Push*`: Sets a new claim check on the stack (does not use key).
+* `*Pop*`: Gets the latest claim check from the stack (does not use key).
 
 When using the `Get`, `GetAndRemove`, or `Set` operation you must specify a 
key.
 These operations will then store and retrieve the data using this key. You can 
use this to store multiple data in different keys.
@@ -52,10 +52,10 @@ The default strategy uses the `filter` option to easily 
specify what data to mer
 
 The `filter` option takes a `String` value with the following syntax:
 
-* `body` - to aggregate the message body.
-* `attachments` - to aggregate all the message attachments.
-* `headers` - to aggregate all the message headers.
-* `header:pattern` - to aggregate all the message headers that matches the 
pattern.
+* `body`: to aggregate the message body.
+* `attachments`: to aggregate all the message attachments.
+* `headers`: to aggregate all the message headers.
+* `header:pattern`: to aggregate all the message headers that match the 
pattern.
 
 The pattern rule supports wildcards and regular expressions:
 
@@ -66,7 +66,7 @@ You can specify multiple rules separated by comma.
 
 === Basic filter examples
 
-For example to include the message body and all headers starting with _foo_:
+For example, to include the message body and all headers starting with _foo_:
 
 [source,text]
 
@@ -101,19 +101,19 @@ To only merge back a header name foo:
 header:foo
 
 
-If the filter rule is specified as empty or as wildcard then everything is 
merged.
+If the filter rule is specified as empty or as wildcard, then everything is 
merged.
 
 Notice that when merging back data, any data in the Message that is not 
overwritten is preserved.
 
 === Filtering with include and exclude patterns
 
-The syntax also supports the following prefixes which can be used to specify 
include, exclude, or remove
+The syntax also supports the following prefixes which can be used to specify 
include, exclude, or remove patterns:
 
 * `+` to include (which is the default mode)
 * `-` to exclude (exclude takes precedence over include)
 * `--` to remove (remove takes precedence)
 
-For example to skip the message body, and merge back everything else
+For example, to skip the message body, and merge back everything else
 
 [source,text]
 



Re: [PR] CAMEL-20459: EIP doc fixes [camel]

2024-02-24 Thread via GitHub


orpiske merged PR #13284:
URL: https://github.com/apache/camel/pull/13284


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



Re: [PR] [Github Actions] Periodic Sync Camel Spring Boot (Camel 4) [camel-spring-boot]

2024-02-24 Thread via GitHub


oscerd closed pull request #1093: [Github Actions] Periodic Sync Camel Spring 
Boot (Camel 4)
URL: https://github.com/apache/camel-spring-boot/pull/1093


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



Re: [PR] CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox) [camel]

2024-02-24 Thread via GitHub


github-actions[bot] commented on PR #13286:
URL: https://github.com/apache/camel/pull/13286#issuecomment-1962841118

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :robot: CI automation will test this PR automatically.
   
   :camel: Apache Camel Committers, please review the following items:
   
   * First-time contributors **require MANUAL approval** for the GitHub Actions 
to run
   
   * You can use the command `/component-test (camel-)component-name1 
(camel-)component-name2..` to request a test from the test bot.
   
   * You can label PRs using `build-all`, `build-dependents`, `skip-tests` and 
`test-dependents` to fine-tune the checks executed by this PR.
   
   * Build and test logs are available in the Summary page. **Only** [Apache 
Camel committers](https://camel.apache.org/community/team/#committers) have 
access to the summary. 
   
   * :warning: Be careful when sharing logs. Review their contents before 
sharing them publicly.


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



[PR] CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox) [camel]

2024-02-24 Thread via GitHub


davsclaus opened a new pull request, #13286:
URL: https://github.com/apache/camel/pull/13286

   # Description
   
   
   
   # Target
   
   - [ ] I checked that the commit is targeting the correct branch (note that 
Camel 3 uses `camel-3.x`, whereas Camel 4 uses the `main` branch)
   
   # Tracking
   - [ ] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   
   
   # Apache Camel coding standards and style
   
   - [ ] I checked that each commit in the pull request has a meaningful 
subject line and body.
   
   
   
   - [ ] I have run `mvn clean install -DskipTests` locally and I have 
committed all auto-generated changes
   
   
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



(camel) 15/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit ceb7e6fd322936494ae260353f1c255e3ee9fe31
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 15:20:32 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../MicrometerExchangeEventNotifier.java   | 45 ++
 1 file changed, 37 insertions(+), 8 deletions(-)

diff --git 
a/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/eventnotifier/MicrometerExchangeEventNotifier.java
 
b/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/eventnotifier/MicrometerExchangeEventNotifier.java
index 61ce90e9526..8dbac32b26f 100644
--- 
a/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/eventnotifier/MicrometerExchangeEventNotifier.java
+++ 
b/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/eventnotifier/MicrometerExchangeEventNotifier.java
@@ -26,6 +26,7 @@ import io.micrometer.core.instrument.Meter;
 import io.micrometer.core.instrument.Tags;
 import io.micrometer.core.instrument.Timer;
 import org.apache.camel.Exchange;
+import org.apache.camel.Route;
 import org.apache.camel.spi.CamelEvent;
 import org.apache.camel.spi.CamelEvent.ExchangeCompletedEvent;
 import org.apache.camel.spi.CamelEvent.ExchangeCreatedEvent;
@@ -33,6 +34,8 @@ import org.apache.camel.spi.CamelEvent.ExchangeEvent;
 import org.apache.camel.spi.CamelEvent.ExchangeFailedEvent;
 import org.apache.camel.spi.CamelEvent.ExchangeSentEvent;
 import org.apache.camel.spi.InflightRepository;
+import org.apache.camel.spi.ManagementStrategy;
+import org.apache.camel.support.ExchangeHelper;
 import org.apache.camel.support.SimpleEventNotifierSupport;
 
 public class MicrometerExchangeEventNotifier extends 
AbstractMicrometerEventNotifier {
@@ -42,6 +45,8 @@ public class MicrometerExchangeEventNotifier extends 
AbstractMicrometerEventNoti
 private Predicate ignoreExchanges = exchange -> false;
 private MicrometerExchangeEventNotifierNamingStrategy namingStrategy
 = MicrometerExchangeEventNotifierNamingStrategy.DEFAULT;
+boolean registerKamelets;
+boolean registerTemplates = true;
 
 public MicrometerExchangeEventNotifier() {
 super(ExchangeEvent.class);
@@ -63,6 +68,15 @@ public class MicrometerExchangeEventNotifier extends 
AbstractMicrometerEventNoti
 this.namingStrategy = namingStrategy;
 }
 
+@Override
+protected void doInit() throws Exception {
+ManagementStrategy ms = getCamelContext().getManagementStrategy();
+if (ms != null && ms.getManagementAgent() != null) {
+registerKamelets = 
ms.getManagementAgent().getRegisterRoutesCreateByKamelet();
+registerTemplates = 
ms.getManagementAgent().getRegisterRoutesCreateByTemplate();
+}
+}
+
 @Override
 protected void doStart() throws Exception {
 super.doStart();
@@ -94,14 +108,29 @@ public class MicrometerExchangeEventNotifier extends 
AbstractMicrometerEventNoti
 
 @Override
 public void notify(CamelEvent eventObject) {
-if (!(getIgnoreExchanges().test(((ExchangeEvent) 
eventObject).getExchange( {
-handleExchangeEvent((ExchangeEvent) eventObject);
-if (eventObject instanceof ExchangeCreatedEvent) {
-handleCreatedEvent((ExchangeCreatedEvent) eventObject);
-} else if (eventObject instanceof ExchangeSentEvent) {
-handleSentEvent((ExchangeSentEvent) eventObject);
-} else if (eventObject instanceof ExchangeCompletedEvent || 
eventObject instanceof ExchangeFailedEvent) {
-handleDoneEvent((ExchangeEvent) eventObject);
+if (eventObject instanceof ExchangeEvent ee) {
+// skip routes that should not be included
+boolean skip = false;
+String routeId = ExchangeHelper.getAtRouteId(ee.getExchange());
+if (routeId != null) {
+Route route = ee.getExchange().getContext().getRoute(routeId);
+if (route != null) {
+skip = (route.isCreatedByKamelet() && !registerKamelets)
+|| (route.isCreatedByRouteTemplate() && 
!registerTemplates);
+}
+}
+if (skip) {
+return;
+}
+if (!(getIgnoreExchanges().test(ee.getExchange( {
+handleExchangeEvent(ee);
+if (eventObject instanceof ExchangeCreatedEvent) {
+handleCreatedEvent((ExchangeCreatedEvent) eventObject);
+} else if (eventObject instanceof ExchangeSentEvent) {
+handleSentEvent((ExchangeSentEvent) eventObject);
+

(camel) 19/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit c6885b21b29ae476f316a84baf55211555d8010d
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 20:42:37 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../apache/camel/catalog/main/camel-main-configuration-metadata.json| 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
index 127e310a2c6..f1e51f670bf 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
@@ -70,6 +70,8 @@
 { "name": "camel.main.jmxEnabled", "description": "Enable JMX in your 
Camel application.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": true },
 { "name": "camel.main.jmxManagementMBeansLevel", "description": "Sets the 
mbeans registration level. The default value is Default.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "object", 
"javaType": "org.apache.camel.ManagementMBeansLevel", "defaultValue": "Default" 
},
 { "name": "camel.main.jmxManagementNamePattern", "description": "The 
naming pattern for creating the CamelContext JMX management name. The default 
pattern is #name#", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "string", 
"javaType": "java.lang.String", "defaultValue": "#name#" },
+{ "name": "camel.main.jmxManagementRegisterRoutesCreateByKamelet", 
"description": "Whether routes created by Kamelets should be registered for JMX 
management. Enabling this allows to have fine-grained monitoring and management 
of every route created via Kamelets. This is default disabled as a Kamelet is 
intended as a component (black-box) and its implementation details as Camel 
route makes the overall management and monitoring of Camel applications more 
verbose. During development of [...]
+{ "name": "camel.main.jmxManagementRegisterRoutesCreateByTemplate", 
"description": "Whether routes created by route templates (not Kamelets) should 
be registered for JMX management. Enabling this allows to have fine-grained 
monitoring and management of every route created via route templates. This is 
default enabled (unlike Kamelets) as routes created via templates is regarded 
as standard routes, and should be available for management and monitoring.", 
"sourceType": "org.apache.camel [...]
 { "name": "camel.main.jmxManagementStatisticsLevel", "description": "Sets 
the JMX statistics level, the level can be set to Extended to gather additional 
information The default value is Default.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "object", 
"javaType": "org.apache.camel.ManagementStatisticsLevel", "defaultValue": 
"Default", "enum": [ "Extended", "Default", "RoutesOnly", "Off" ] },
 { "name": "camel.main.jmxUpdateRouteEnabled", "description": "Whether to 
allow updating routes at runtime via JMX using the ManagedRouteMBean. This is 
disabled by default, but can be enabled for development and troubleshooting 
purposes, such as updating routes in an existing running Camel via JMX and 
other tools.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": "false" },
 { "name": "camel.main.lightweight", "description": "Configure the context 
to be lightweight. This will trigger some optimizations and memory reduction 
options. Lightweight context have some limitations. At this moment, dynamic 
endpoint destinations are not supported.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": "false" },



(camel) 04/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 6c6ffe0172388583b9437a1ee74517bc681ed9fb
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 10:45:00 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 components/camel-kamelet/pom.xml   |  5 ++
 .../kamelet/ManagedKameletRouteDisabledTest.java   | 94 ++
 .../component/kamelet/ManagedKameletRouteTest.java | 85 +++
 .../management/JmxManagementLifecycleStrategy.java |  9 +++
 4 files changed, 193 insertions(+)

diff --git a/components/camel-kamelet/pom.xml b/components/camel-kamelet/pom.xml
index 1fdb9f82918..57b70f9155a 100644
--- a/components/camel-kamelet/pom.xml
+++ b/components/camel-kamelet/pom.xml
@@ -44,6 +44,11 @@
 
 
 
+
+org.apache.camel
+camel-management
+test
+
 
 org.apache.camel
 camel-xml-jaxb
diff --git 
a/components/camel-kamelet/src/test/java/org/apache/camel/component/kamelet/ManagedKameletRouteDisabledTest.java
 
b/components/camel-kamelet/src/test/java/org/apache/camel/component/kamelet/ManagedKameletRouteDisabledTest.java
new file mode 100644
index 000..908c93248d4
--- /dev/null
+++ 
b/components/camel-kamelet/src/test/java/org/apache/camel/component/kamelet/ManagedKameletRouteDisabledTest.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.kamelet;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.UUID;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.apache.camel.util.StringHelper;
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class ManagedKameletRouteDisabledTest extends CamelTestSupport {
+
+@Override
+protected boolean useJmx() {
+return true;
+}
+
+protected MBeanServer getMBeanServer() {
+return 
context.getManagementStrategy().getManagementAgent().getMBeanServer();
+}
+
+@Override
+protected CamelContext createCamelContext() throws Exception {
+CamelContext context = super.createCamelContext();
+
context.getManagementStrategy().getManagementAgent().setRegisterRoutesCreateByKamelet(false);
+return context;
+}
+
+@Test
+public void testKameletRouteMBeanDisabled() throws Exception {
+String body = UUID.randomUUID().toString();
+
+assertThat(
+
fluentTemplate.toF("direct:single").withBody(body).request(String.class)).isEqualTo("a-"
 + body);
+
+MBeanServer mbeanServer = getMBeanServer();
+
+Set set = mbeanServer.queryNames(new 
ObjectName("*:type=routes,*"), null);
+assertEquals(1, set.size());
+
+Set ids = new HashSet<>();
+for (ObjectName on : set) {
+String uri = (String) mbeanServer.getAttribute(on, "EndpointUri");
+String name = StringHelper.before(uri, ":");
+ids.add(name);
+}
+assertTrue(ids.contains("direct"));
+assertFalse(ids.contains("kamelet"));
+}
+
+@Override
+protected RoutesBuilder createRouteBuilder() throws Exception {
+return new RouteBuilder() {
+@Override
+public void configure() throws Exception {
+routeTemplate("echo")
+.templateParameter("prefix")
+.from("kamelet:source")
+.setBody().simple("{{prefix}}-${body}");
+
+from("direct:single").routeId("test")
+ 

(camel) 01/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e8e531daaab0d606fe8e0b5b9993fef88281590b
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 10:00:53 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../java/org/apache/camel/component/kamelet/Kamelet.java |  2 ++
 core/camel-api/src/main/java/org/apache/camel/Route.java | 16 
 .../java/org/apache/camel/impl/engine/DefaultRoute.java  | 15 +++
 .../java/org/apache/camel/model/RouteDefinition.java | 16 +++-
 .../main/java/org/apache/camel/reifier/RouteReifier.java |  2 ++
 .../camel/api/management/mbean/ManagedRouteMBean.java|  6 ++
 .../org/apache/camel/management/mbean/ManagedRoute.java  | 10 ++
 .../java/org/apache/camel/xml/in/ModelParser.java|  1 +
 .../java/org/apache/camel/xml/out/ModelWriter.java   |  1 +
 .../java/org/apache/camel/yaml/out/ModelWriter.java  |  1 +
 10 files changed, 69 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/Kamelet.java
 
b/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/Kamelet.java
index bda62f27103..3db8c6f8250 100644
--- 
a/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/Kamelet.java
+++ 
b/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/Kamelet.java
@@ -130,6 +130,8 @@ public final class Kamelet {
 ObjectHelper.notNull(rid, PARAM_ROUTE_ID);
 
 RouteDefinition def = in.asRouteDefinition();
+// mark this as created from a kamelet
+def.setKamelet(true);
 def.setLocation(in.getLocation());
 def.setLineNumber(in.getLineNumber());
 def.setId(rid);
diff --git a/core/camel-api/src/main/java/org/apache/camel/Route.java 
b/core/camel-api/src/main/java/org/apache/camel/Route.java
index a7d0f0cd054..d247d02240a 100644
--- a/core/camel-api/src/main/java/org/apache/camel/Route.java
+++ b/core/camel-api/src/main/java/org/apache/camel/Route.java
@@ -47,6 +47,7 @@ public interface Route extends RuntimeConfiguration {
 String NODE_PREFIX_ID_PROPERTY = "nodePrefixId";
 String REST_PROPERTY = "rest";
 String TEMPLATE_PROPERTY = "template";
+String KAMELET_PROPERTY = "kamelet";
 String DESCRIPTION_PROPERTY = "description";
 String CONFIGURATION_ID_PROPERTY = "configurationId";
 String SUPERVISED = "supervised";
@@ -70,6 +71,21 @@ public interface Route extends RuntimeConfiguration {
  */
 boolean isCustomId();
 
+/**
+ * Whether this route is a Rest DSL route.
+ */
+boolean isCreatedByRestDsl();
+
+/**
+ * Whether this route was created from a route template (or a Kamelet).
+ */
+boolean isCreatedByRouteTemplate();
+
+/**
+ * Whether this route was created from a Kamelet.
+ */
+boolean isCreatedByKamelet();
+
 /**
  * Gets the route group
  *
diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRoute.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRoute.java
index 1e90f04be21..eab52da2dfd 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRoute.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRoute.java
@@ -141,6 +141,21 @@ public class DefaultRoute extends ServiceSupport 
implements Route {
 return "true".equals(properties.get(Route.CUSTOM_ID_PROPERTY));
 }
 
+@Override
+public boolean isCreatedByRestDsl() {
+return "true".equals(properties.get(Route.REST_PROPERTY));
+}
+
+@Override
+public boolean isCreatedByRouteTemplate() {
+return "true".equals(properties.get(Route.TEMPLATE_PROPERTY));
+}
+
+@Override
+public boolean isCreatedByKamelet() {
+return "true".equals(properties.get(Route.KAMELET_PROPERTY));
+}
+
 @Override
 public String getGroup() {
 return (String) properties.get(Route.GROUP_PROPERTY);
diff --git 
a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java
 
b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java
index 7b274a5ef1c..aa78b73fdc4 100644
--- 
a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java
+++ 
b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java
@@ -86,6 +86,7 @@ public class RouteDefinition extends 
OutputDefinition
 private boolean contextScopedErrorHandler = true;
 private Boolean rest;
 private Boolean template;
+private Boolean kamelet;
 private RestDefinition restDefinition;
 private RestBindingDefinition restBindingDefinition;
   

(camel) 02/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit c25378da4980013b90b28d6d9612a621c0f8b4e7
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 10:06:40 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../resources/org/apache/camel/catalog/schemas/camel-spring.xsd  | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index bdf7a264bea..87b01646d3f 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -12258,6 +12258,7 @@ XML. May be null.
 
   
 
+
 
   
 



(camel) 14/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit cf38fd28d3b5144fe71217f9e72935979a398aa0
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 15:12:21 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../eventnotifier/MicrometerRouteEventNotifier.java  | 20 
 .../routepolicy/MicrometerRoutePolicy.java   | 19 ++-
 .../camel/impl/engine/AbstractCamelContext.java  | 18 ++
 3 files changed, 52 insertions(+), 5 deletions(-)

diff --git 
a/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/eventnotifier/MicrometerRouteEventNotifier.java
 
b/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/eventnotifier/MicrometerRouteEventNotifier.java
index 6c638e031ce..04b5cb07266 100644
--- 
a/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/eventnotifier/MicrometerRouteEventNotifier.java
+++ 
b/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/eventnotifier/MicrometerRouteEventNotifier.java
@@ -26,6 +26,7 @@ import org.apache.camel.spi.CamelEvent.RouteReloadedEvent;
 import org.apache.camel.spi.CamelEvent.RouteRemovedEvent;
 import org.apache.camel.spi.CamelEvent.RouteStartedEvent;
 import org.apache.camel.spi.CamelEvent.RouteStoppedEvent;
+import org.apache.camel.spi.ManagementStrategy;
 
 public class MicrometerRouteEventNotifier extends 
AbstractMicrometerEventNotifier {
 
@@ -36,6 +37,8 @@ public class MicrometerRouteEventNotifier extends 
AbstractMicrometerEventNotifie
 private Gauge gaugeRunning;
 private Gauge gaugeReloaded;
 private MicrometerRouteEventNotifierNamingStrategy namingStrategy = 
MicrometerRouteEventNotifierNamingStrategy.DEFAULT;
+boolean registerKamelets;
+boolean registerTemplates = true;
 
 public MicrometerRouteEventNotifier() {
 super(RouteEvent.class);
@@ -49,6 +52,15 @@ public class MicrometerRouteEventNotifier extends 
AbstractMicrometerEventNotifie
 this.namingStrategy = namingStrategy;
 }
 
+@Override
+protected void doInit() throws Exception {
+ManagementStrategy ms = getCamelContext().getManagementStrategy();
+if (ms != null && ms.getManagementAgent() != null) {
+registerKamelets = 
ms.getManagementAgent().getRegisterRoutesCreateByKamelet();
+registerTemplates = 
ms.getManagementAgent().getRegisterRoutesCreateByTemplate();
+}
+}
+
 @Override
 protected void doStart() throws Exception {
 super.doStart();
@@ -84,6 +96,14 @@ public class MicrometerRouteEventNotifier extends 
AbstractMicrometerEventNotifie
 
 @Override
 public void notify(CamelEvent eventObject) {
+if (eventObject instanceof RouteEvent re) {
+// skip routes that should not be included
+boolean skip = (re.getRoute().isCreatedByKamelet() && 
!registerKamelets)
+|| (re.getRoute().isCreatedByRouteTemplate() && 
!registerTemplates);
+if (skip) {
+return;
+}
+}
 if (eventObject instanceof RouteAddedEvent) {
 routesAdded.incrementAndGet();
 } else if (eventObject instanceof RouteRemovedEvent) {
diff --git 
a/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/routepolicy/MicrometerRoutePolicy.java
 
b/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/routepolicy/MicrometerRoutePolicy.java
index 264cb58d6cf..74681d8797d 100644
--- 
a/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/routepolicy/MicrometerRoutePolicy.java
+++ 
b/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/routepolicy/MicrometerRoutePolicy.java
@@ -31,6 +31,7 @@ import org.apache.camel.NonManagedService;
 import org.apache.camel.Route;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.component.micrometer.MicrometerUtils;
+import org.apache.camel.spi.ManagementStrategy;
 import org.apache.camel.support.ExchangeHelper;
 import org.apache.camel.support.RoutePolicySupport;
 import org.apache.camel.support.service.ServiceHelper;
@@ -54,6 +55,8 @@ public class MicrometerRoutePolicy extends RoutePolicySupport 
implements NonMana
 private MicrometerRoutePolicyConfiguration configuration = 
MicrometerRoutePolicyConfiguration.DEFAULT;
 
 private final Map statisticsMap = new 
HashMap<>();
+boolean registerKamelets;
+boolean registerTemplates = true;
 
 private static final class MetricsStatistics {
 private final MeterRegistry meterRegistry;
@@ -221,6 +224,12 @@ public class MicrometerRoutePolicy extends 
RoutePolicySupport 

(camel) 16/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 69537192604a866b0b3e7205fc6b3624c5d8f010
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 20:08:12 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../camel/component/kamelet/KameletProcessor.java  |  3 ++
 .../camel/component/kamelet/KameletProducer.java   | 14 +++-
 .../camel/impl/engine/AbstractCamelContext.java|  9 +++--
 .../org/apache/camel/processor/SendProcessor.java  |  3 ++
 .../camel/main/DefaultConfigurationProperties.java | 40 +++---
 5 files changed, 45 insertions(+), 24 deletions(-)

diff --git 
a/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProcessor.java
 
b/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProcessor.java
index be684473f55..9bfab346d8f 100644
--- 
a/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProcessor.java
+++ 
b/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProcessor.java
@@ -123,6 +123,9 @@ public class KameletProcessor extends AsyncProcessorSupport
 if (producer == null) {
 producer = (KameletProducer) camelContext.getEndpoint("kamelet://" 
+ name).createAsyncProducer();
 }
+if (producer != null) {
+((RouteIdAware) producer).setRouteId(getRouteId());
+}
 ServiceHelper.buildService(processor, producer);
 
 // we use the kamelet component (producer) to call the kamelet
diff --git 
a/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java
 
b/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java
index cc05702c5e8..1e2d2960647 100644
--- 
a/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java
+++ 
b/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java
@@ -20,12 +20,13 @@ import org.apache.camel.AsyncCallback;
 import org.apache.camel.AsyncProcessor;
 import org.apache.camel.Exchange;
 import org.apache.camel.Route;
+import org.apache.camel.spi.RouteIdAware;
 import org.apache.camel.support.DefaultAsyncProducer;
 import org.apache.camel.support.ExchangeHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-final class KameletProducer extends DefaultAsyncProducer {
+final class KameletProducer extends DefaultAsyncProducer implements 
RouteIdAware {
 
 private static final Logger LOG = 
LoggerFactory.getLogger(KameletProducer.class);
 
@@ -38,6 +39,7 @@ final class KameletProducer extends DefaultAsyncProducer {
 private final boolean block;
 private final long timeout;
 private final boolean sink;
+private String routeId;
 
 public KameletProducer(KameletEndpoint endpoint, String key) {
 super(endpoint);
@@ -124,6 +126,16 @@ final class KameletProducer extends DefaultAsyncProducer {
 }
 }
 
+@Override
+public String getRouteId() {
+return routeId;
+}
+
+@Override
+public void setRouteId(String routeId) {
+this.routeId = routeId;
+}
+
 public String getKey() {
 return key;
 }
diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index 09a13fec427..d14bb4760cb 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -2594,7 +2594,8 @@ public abstract class AbstractCamelContext extends 
BaseService
 rests++;
 }
 boolean skip = order.getRoute().isCreatedByRestDsl()
-   ||  (!registerKamelets && 
order.getRoute().isCreatedByKamelet()) || (!registerTemplates && 
order.getRoute().isCreatedByRouteTemplate());
+|| (!registerKamelets && 
order.getRoute().isCreatedByKamelet())
+|| (!registerTemplates && 
order.getRoute().isCreatedByRouteTemplate());
 if (!skip && ServiceStatus.Started.name().equals(status)) {
 started++;
 }
@@ -2631,7 +2632,8 @@ public abstract class AbstractCamelContext extends 
BaseService
 } else if (route.isCreatedByRestDsl()) {
 rests++;
 }
-boolean skip = route.isCreatedByRestDsl() || 
(!registerKamelets && route.isCreatedByKamelet()) || (!registerTemplates && 
route.isCreatedByRouteTemplate());
+ 

(camel) 09/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit b21ab0e29ca69abab345102bf4f0a5e6b232547d
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 12:18:07 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../main/java/org/apache/camel/spi/UnitOfWork.java | 15 +++
 .../camel/impl/engine/DefaultUnitOfWork.java   | 22 ++
 .../management/mbean/ManagedCamelContext.java  | 10 +++---
 3 files changed, 44 insertions(+), 3 deletions(-)

diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/UnitOfWork.java 
b/core/camel-api/src/main/java/org/apache/camel/spi/UnitOfWork.java
index b9d28cb530e..75b5de4cd2a 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/UnitOfWork.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/UnitOfWork.java
@@ -203,6 +203,21 @@ public interface UnitOfWork {
  */
 int routeStackLevel();
 
+/**
+ * Gets the {@link Route} level-of-depth that this {@link UnitOfWork} 
currently is being routed through.
+ * 
+ * Notice that an {@link Exchange} can be routed through multiple routes 
and thus the level of depth can change over
+ * time.
+ * 
+ * If level is 1 then the current route is at the first route (original 
route). Maybe be 0 if not routed
+ * through a route currently.
+ *
+ * @param  includeRouteTemplate whether to include routes created by route 
templates
+ * @param  includeKamelet   whether to include routes created by 
kamelets
+ * @return  the route level-of-depth
+ */
+int routeStackLevel(boolean includeRouteTemplate, boolean includeKamelet);
+
 /**
  * Whether the unit of work should call the before/after process methods 
or not.
  */
diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultUnitOfWork.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultUnitOfWork.java
index c5230567ec3..51f8680b33f 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultUnitOfWork.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultUnitOfWork.java
@@ -367,6 +367,28 @@ public class DefaultUnitOfWork implements UnitOfWork {
 return routes.size();
 }
 
+public int routeStackLevel(boolean includeRouteTemplate, boolean 
includeKamelet) {
+if (includeKamelet && includeRouteTemplate) {
+return routes.size();
+}
+
+int level = 0;
+for (Route r : routes) {
+if (r.isCreatedByKamelet()) {
+if (includeKamelet) {
+level++;
+}
+} else if (r.isCreatedByRouteTemplate()) {
+if (includeRouteTemplate) {
+level++;
+}
+} else {
+level++;
+}
+}
+return level;
+}
+
 @Override
 public boolean isBeforeAfterProcess() {
 return false;
diff --git 
a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
 
b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
index c964039c948..000b07c00de 100644
--- 
a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
+++ 
b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
@@ -61,10 +61,14 @@ public class ManagedCamelContext extends 
ManagedPerformanceCounter implements Ti
 private final LoadTriplet load = new LoadTriplet();
 private final LoadThroughput thp = new LoadThroughput();
 private final String jmxDomain;
+private final boolean includeRouteTemplates;
+private final boolean includeKamelets;
 
 public ManagedCamelContext(CamelContext context) {
 this.context = context;
 this.jmxDomain = 
context.getManagementStrategy().getManagementAgent().getMBeanObjectDomainName();
+this.includeRouteTemplates = 
context.getManagementStrategy().getManagementAgent().getRegisterRoutesCreateByTemplate();
+this.includeKamelets = 
context.getManagementStrategy().getManagementAgent().getRegisterRoutesCreateByKamelet();
 }
 
 @Override
@@ -83,7 +87,7 @@ public class ManagedCamelContext extends 
ManagedPerformanceCounter implements Ti
 // we should only count this as 1 instead of 3.
 UnitOfWork uow = exchange.getUnitOfWork();
 if (uow != null) {
-int level = uow.routeStackLevel();
+int level = uow.routeStackLevel(includeRouteTemplates, 
includeKamelets);
 if (level <= 1) {
 super.completedExchange(exchange, 

(camel) 13/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 2c6995d51a6fc1529d7ae4676a11f7967d6a49b8
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 14:37:26 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../MainConfigurationPropertiesConfigurer.java | 12 
 .../camel-main-configuration-metadata.json |  2 +
 core/camel-main/src/main/docs/main.adoc|  4 +-
 .../camel/main/DefaultConfigurationConfigurer.java |  4 ++
 .../camel/main/DefaultConfigurationProperties.java | 66 ++
 5 files changed, 87 insertions(+), 1 deletion(-)

diff --git 
a/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java
 
b/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java
index ca08ad52360..7d2f91e74db 100644
--- 
a/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java
+++ 
b/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java
@@ -125,6 +125,10 @@ public class MainConfigurationPropertiesConfigurer extends 
org.apache.camel.supp
 case "JmxManagementMBeansLevel": 
target.setJmxManagementMBeansLevel(property(camelContext, 
org.apache.camel.ManagementMBeansLevel.class, value)); return true;
 case "jmxmanagementnamepattern":
 case "JmxManagementNamePattern": 
target.setJmxManagementNamePattern(property(camelContext, 
java.lang.String.class, value)); return true;
+case "jmxmanagementregisterroutescreatebykamelet":
+case "JmxManagementRegisterRoutesCreateByKamelet": 
target.setJmxManagementRegisterRoutesCreateByKamelet(property(camelContext, 
boolean.class, value)); return true;
+case "jmxmanagementregisterroutescreatebytemplate":
+case "JmxManagementRegisterRoutesCreateByTemplate": 
target.setJmxManagementRegisterRoutesCreateByTemplate(property(camelContext, 
boolean.class, value)); return true;
 case "jmxmanagementstatisticslevel":
 case "JmxManagementStatisticsLevel": 
target.setJmxManagementStatisticsLevel(property(camelContext, 
org.apache.camel.ManagementStatisticsLevel.class, value)); return true;
 case "jmxupdaterouteenabled":
@@ -366,6 +370,10 @@ public class MainConfigurationPropertiesConfigurer extends 
org.apache.camel.supp
 case "JmxManagementMBeansLevel": return 
org.apache.camel.ManagementMBeansLevel.class;
 case "jmxmanagementnamepattern":
 case "JmxManagementNamePattern": return java.lang.String.class;
+case "jmxmanagementregisterroutescreatebykamelet":
+case "JmxManagementRegisterRoutesCreateByKamelet": return 
boolean.class;
+case "jmxmanagementregisterroutescreatebytemplate":
+case "JmxManagementRegisterRoutesCreateByTemplate": return 
boolean.class;
 case "jmxmanagementstatisticslevel":
 case "JmxManagementStatisticsLevel": return 
org.apache.camel.ManagementStatisticsLevel.class;
 case "jmxupdaterouteenabled":
@@ -608,6 +616,10 @@ public class MainConfigurationPropertiesConfigurer extends 
org.apache.camel.supp
 case "JmxManagementMBeansLevel": return 
target.getJmxManagementMBeansLevel();
 case "jmxmanagementnamepattern":
 case "JmxManagementNamePattern": return 
target.getJmxManagementNamePattern();
+case "jmxmanagementregisterroutescreatebykamelet":
+case "JmxManagementRegisterRoutesCreateByKamelet": return 
target.isJmxManagementRegisterRoutesCreateByKamelet();
+case "jmxmanagementregisterroutescreatebytemplate":
+case "JmxManagementRegisterRoutesCreateByTemplate": return 
target.isJmxManagementRegisterRoutesCreateByTemplate();
 case "jmxmanagementstatisticslevel":
 case "JmxManagementStatisticsLevel": return 
target.getJmxManagementStatisticsLevel();
 case "jmxupdaterouteenabled":
diff --git 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index 127e310a2c6..f1e51f670bf 100644
--- 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++ 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -70,6 +70,8 @@
 { "name": "camel.main.jmxEnabled", "description": "Enable JMX in your 
Camel application.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": true },
 { "name": "camel.main.jmxManagementMBeansLevel", "description": "Sets the 
mbeans registration level. The default value is Default.", "sourceType": 

(camel) 10/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit c7214a7d1880b28598f0d31942636f658e25456d
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 14:00:54 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../camel/impl/engine/AbstractCamelContext.java| 73 +++---
 1 file changed, 64 insertions(+), 9 deletions(-)

diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index 24cb8e2af08..d99e3368c28 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -2567,7 +2567,12 @@ public abstract class AbstractCamelContext extends 
BaseService
 && LOG.isInfoEnabled()) {
 int started = 0;
 int total = 0;
+int kamelets = 0;
+int templates = 0;
+int rests = 0;
 int disabled = 0;
+boolean registerKamelets = 
getManagementStrategy().getManagementAgent().getRegisterRoutesCreateByKamelet();
+boolean registerTemplates = 
getManagementStrategy().getManagementAgent().getRegisterRoutesCreateByTemplate();
 List lines = new ArrayList<>();
 List configs = new ArrayList<>();
 
routeStartupOrder.sort(Comparator.comparingInt(RouteStartupOrder::getStartupOrder));
@@ -2575,9 +2580,18 @@ public abstract class AbstractCamelContext extends 
BaseService
 total++;
 String id = order.getRoute().getRouteId();
 String status = getRouteStatus(id).name();
-if (ServiceStatus.Started.name().equals(status)) {
+if (order.getRoute().isCreatedByKamelet()) {
+kamelets++;
+} else if (order.getRoute().isCreatedByRouteTemplate()) {
+templates++;
+} else if (order.getRoute().isCreatedByRestDsl()) {
+rests++;
+}
+boolean skip = (!registerKamelets && 
order.getRoute().isCreatedByKamelet()) || (!registerTemplates && 
order.getRoute().isCreatedByRouteTemplate());
+if (!skip && ServiceStatus.Started.name().equals(status)) {
 started++;
 }
+
 // use basic endpoint uri to not log verbose details or 
potential sensitive data
 String uri = 
order.getRoute().getEndpoint().getEndpointBaseUri();
 uri = URISupport.sanitizeUri(uri);
@@ -2585,7 +2599,9 @@ public abstract class AbstractCamelContext extends 
BaseService
 if (startupSummaryLevel == StartupSummaryLevel.Verbose && loc 
!= null) {
 lines.add(String.format("%s %s (%s) (source: %s)", 
status, id, uri, loc));
 } else {
-lines.add(String.format("%s %s (%s)", status, id, 
uri));
+if (!skip) {
+lines.add(String.format("%s %s (%s)", status, id, 
uri));
+}
 }
 String cid = order.getRoute().getConfigurationId();
 if (cid != null) {
@@ -2601,6 +2617,14 @@ public abstract class AbstractCamelContext extends 
BaseService
 if (ServiceStatus.Stopped.name().equals(status)) {
 status = "Disabled";
 }
+if (route.isCreatedByKamelet()) {
+kamelets++;
+} else if (route.isCreatedByRouteTemplate()) {
+templates++;
+} else if (route.isCreatedByRestDsl()) {
+rests++;
+}
+boolean skip = (!registerKamelets && 
route.isCreatedByKamelet()) || (!registerTemplates && 
route.isCreatedByRouteTemplate());
 // use basic endpoint uri to not log verbose details or 
potential sensitive data
 String uri = route.getEndpoint().getEndpointBaseUri();
 uri = URISupport.sanitizeUri(uri);
@@ -2608,7 +2632,9 @@ public abstract class AbstractCamelContext extends 
BaseService
 if (startupSummaryLevel == StartupSummaryLevel.Verbose && 
loc != null) {
 lines.add(String.format("%s %s (%s) (source: %s)", 
status, id, uri, loc));
 } else {
-lines.add(String.format("%s %s (%s)", status, id, 
uri));
+if (!skip) {
+

(camel) 07/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit f23c0ec9e00a5f17ff41b1bcd10f2135470fa76c
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 11:29:22 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../main/java/org/apache/camel/impl/console/ConsumerDevConsole.java  | 2 +-
 .../src/main/java/org/apache/camel/impl/console/RouteDevConsole.java | 5 +++--
 .../main/java/org/apache/camel/impl/console/RouteDumpDevConsole.java | 2 ++
 .../main/java/org/apache/camel/impl/console/SourceDevConsole.java| 2 ++
 .../src/main/java/org/apache/camel/impl/console/TopDevConsole.java   | 3 +++
 5 files changed, 11 insertions(+), 3 deletions(-)

diff --git 
a/core/camel-console/src/main/java/org/apache/camel/impl/console/ConsumerDevConsole.java
 
b/core/camel-console/src/main/java/org/apache/camel/impl/console/ConsumerDevConsole.java
index 3341c80c43d..a75ea58d2fb 100644
--- 
a/core/camel-console/src/main/java/org/apache/camel/impl/console/ConsumerDevConsole.java
+++ 
b/core/camel-console/src/main/java/org/apache/camel/impl/console/ConsumerDevConsole.java
@@ -139,7 +139,7 @@ public class ConsumerDevConsole extends AbstractDevConsole {
 String id = route.getId();
 ManagedRouteMBean mr = mcc.getManagedRoute(id);
 ManagedConsumerMBean mc = mcc.getManagedConsumer(id);
-if (mc != null) {
+if (mr != null && mc != null) {
 JsonObject jo = new JsonObject();
 Integer inflight = mc.getInflightExchanges();
 if (inflight == null) {
diff --git 
a/core/camel-console/src/main/java/org/apache/camel/impl/console/RouteDevConsole.java
 
b/core/camel-console/src/main/java/org/apache/camel/impl/console/RouteDevConsole.java
index e060fb93607..1e6ee27a284 100644
--- 
a/core/camel-console/src/main/java/org/apache/camel/impl/console/RouteDevConsole.java
+++ 
b/core/camel-console/src/main/java/org/apache/camel/impl/console/RouteDevConsole.java
@@ -22,6 +22,7 @@ import java.util.Comparator;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.function.Function;
 
 import org.apache.camel.Exchange;
@@ -359,6 +360,7 @@ public class RouteDevConsole extends AbstractDevConsole {
 routes.sort((o1, o2) -> 
o1.getRouteId().compareToIgnoreCase(o2.getRouteId()));
 routes.stream()
 .map(route -> mcc.getManagedRoute(route.getRouteId()))
+.filter(Objects::nonNull)
 .filter(r -> accept(r, filter))
 .filter(r -> accept(r, subPath))
 .sorted(RouteDevConsole::sort)
@@ -378,8 +380,7 @@ public class RouteDevConsole extends AbstractDevConsole {
 }
 
 private static int sort(ManagedRouteMBean o1, ManagedRouteMBean o2) {
-// sort by id
-return o1.getRouteId().compareTo(o2.getRouteId());
+return o1.getRouteId().compareToIgnoreCase(o2.getRouteId());
 }
 
 private String getLoad1(ManagedRouteMBean mrb) {
diff --git 
a/core/camel-console/src/main/java/org/apache/camel/impl/console/RouteDumpDevConsole.java
 
b/core/camel-console/src/main/java/org/apache/camel/impl/console/RouteDumpDevConsole.java
index 659f388c439..63c127b0d82 100644
--- 
a/core/camel-console/src/main/java/org/apache/camel/impl/console/RouteDumpDevConsole.java
+++ 
b/core/camel-console/src/main/java/org/apache/camel/impl/console/RouteDumpDevConsole.java
@@ -20,6 +20,7 @@ import java.io.StringReader;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.function.Function;
 
 import org.apache.camel.Exchange;
@@ -151,6 +152,7 @@ public class RouteDumpDevConsole extends AbstractDevConsole 
{
 routes.sort((o1, o2) -> 
o1.getRouteId().compareToIgnoreCase(o2.getRouteId()));
 routes.stream()
 .map(route -> mcc.getManagedRoute(route.getRouteId()))
+.filter(Objects::nonNull)
 .filter(r -> accept(r, filter))
 .filter(r -> accept(r, subPath))
 .sorted(RouteDumpDevConsole::sort)
diff --git 
a/core/camel-console/src/main/java/org/apache/camel/impl/console/SourceDevConsole.java
 
b/core/camel-console/src/main/java/org/apache/camel/impl/console/SourceDevConsole.java
index ea96a307af6..c848030b181 100644
--- 
a/core/camel-console/src/main/java/org/apache/camel/impl/console/SourceDevConsole.java
+++ 
b/core/camel-console/src/main/java/org/apache/camel/impl/console/SourceDevConsole.java
@@ -20,6 +20,7 @@ import java.io.LineNumberReader;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import 

(camel) 05/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 4962898894b409ce3fe3268efcf49609803d12b3
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 10:49:53 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 docs/user-manual/modules/ROOT/pages/jmx.adoc | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/jmx.adoc 
b/docs/user-manual/modules/ROOT/pages/jmx.adoc
index d428877efa6..e13a85e1b83 100644
--- a/docs/user-manual/modules/ROOT/pages/jmx.adoc
+++ b/docs/user-manual/modules/ROOT/pages/jmx.adoc
@@ -133,9 +133,9 @@ MBeans are registered at startup. The levels are:
 
 * `ContextOnly` -  Camel will register MBeans for the context (neither for any 
route nor for any processor).
 
-=== Registering new MBeans for new routes or endpoints
+=== Registering new MBeans for new routes, created by route templates, Kamelets
 
-Camel provides two settings to control when to register mbeans.
+Camel provides the following settings to control when to register mbeans.
 
 [width="100%",cols="34%,33%,33%",options="header",]
 |===
@@ -145,6 +145,11 @@ Camel provides two settings to control when to register 
mbeans.
 |`registerNewRoutes` |`true` |If enabled then adding new routes after
 CamelContext has been started will also register
 MBeans from that given route.
+
+|`registerRoutesCreateByKamelet` |`true` |If enabled then adding routes 
created by Kamelet will also register MBeans from that given route.
+
+|`registerRoutesCreateByTemplate` |`true` |If enabled then adding routes 
created by route template (not Kamelet, see option above) will also register 
MBeans from that given route.
+
 |===
 
 By default, Camel automatically registers MBeans for all routes configured at
@@ -153,6 +158,10 @@ registered for new routes added later on. This feature can 
be disabled, for
 example, if you are adding and removing temporary routes that do not require
 management.
 
+In *Camel 4.5* onwards there are additional options to configure whether 
routes created from route templates or Kamelets
+should be registered as MBeans or not. Disabling this allows to not clutter up 
with many MBeans for Kamelets or route
+templates that may not be needed for management and monitoring.
+
 CAUTION: However, be cautious when using the `registerAlways` option in
 conjunction with dynamic EIP patterns, such as the 
xref:components:eips:recipientList-eip.adoc[Recipient List],
 which have unique endpoints. This can potentially lead to system degradation



(camel) 17/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 96d64fac99c7d75dfb0ecad07a8b085f777fc885
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 20:11:00 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc
index a8096295f85..17cf601e50c 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc
@@ -8,6 +8,10 @@ from both 4.0 to 4.1 and 4.1 to 4.2.
 
 === camel-core
 
+Camel startup summary will now report total number of routes without (internal 
routes created by Kamelets or Rest DSL).
+This ensures the total number better reflect the total number of user created 
routes. The summary now includes a separate
+number of Kamelets and Rest DSL routes. See also the camel-kamelet section.
+
 === Intercept EIP
 
 The `interceptFrom` and `interceptSentToEndpoint` EIPs is now storing the 
intercepted endpoint using key `Exchange.INTERCEPTED_ENDPOINT`
@@ -31,8 +35,7 @@ String uri = 
exchange.getProperty(Exchange.INTERCEPTED_ENDPOINT, String.class);
 
 Routes created by Kamelets are no longer registered as JMX MBeans to avoid 
cluttering up with unwanted MBeans, as a Kamelet
 is intended to act like a Camel component, despite its implementation is Camel 
routes. This means that the number of routes
-listed from JMX etc will no longer include Kamelet routes.
-
+listed from JMX will no longer include Kamelet routes.
 
 The old behaviour can be enabled by setting 
`registerRoutesCreateByKamelet=true`
 on the `ManagementAgent` object. See more in the xref:jmx.adoc[JMX] 
documentation.



(camel) 18/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 945206522767a151b465663e5dceab4a3a3e0714
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 20:28:08 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../metrics/routepolicy/MetricsRoutePolicy.java| 24 +-
 .../ROOT/pages/camel-4x-upgrade-guide-4_5.adoc |  8 
 2 files changed, 27 insertions(+), 5 deletions(-)

diff --git 
a/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/routepolicy/MetricsRoutePolicy.java
 
b/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/routepolicy/MetricsRoutePolicy.java
index f278fba42c9..17cacae8441 100644
--- 
a/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/routepolicy/MetricsRoutePolicy.java
+++ 
b/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/routepolicy/MetricsRoutePolicy.java
@@ -26,6 +26,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.NonManagedService;
 import org.apache.camel.Route;
 import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.ManagementStrategy;
 import org.apache.camel.support.RoutePolicySupport;
 
 /**
@@ -50,6 +51,8 @@ public class MetricsRoutePolicy extends RoutePolicySupport 
implements NonManaged
 private MetricsStatistics statistics;
 private Route route;
 private String namePattern = String.format("%s.%s.%s", NAME_TOKEN, 
ROUTE_ID_TOKEN, TYPE_TOKEN);
+boolean registerKamelets;
+boolean registerTemplates = true;
 
 private static final class MetricsStatistics {
 private final String routeId;
@@ -139,6 +142,12 @@ public class MetricsRoutePolicy extends RoutePolicySupport 
implements NonManaged
 public void onInit(Route route) {
 super.onInit(route);
 
+ManagementStrategy ms = 
route.getCamelContext().getManagementStrategy();
+if (ms != null && ms.getManagementAgent() != null) {
+registerKamelets = 
ms.getManagementAgent().getRegisterRoutesCreateByKamelet();
+registerTemplates = 
ms.getManagementAgent().getRegisterRoutesCreateByTemplate();
+}
+
 this.route = route;
 try {
 registryService = 
route.getCamelContext().hasService(MetricsRegistryService.class);
@@ -156,11 +165,16 @@ public class MetricsRoutePolicy extends 
RoutePolicySupport implements NonManaged
 throw RuntimeCamelException.wrapRuntimeCamelException(e);
 }
 
-// create statistics holder
-// for know we record only all the timings of a complete exchange 
(responses)
-// we have in-flight / total statistics already from camel-core
-Timer responses = 
registryService.getMetricsRegistry().timer(createName("responses"));
-statistics = new MetricsStatistics(route, responses);
+// skip routes that should not be included
+boolean skip = (route.isCreatedByKamelet() && !registerKamelets)
+|| (route.isCreatedByRouteTemplate() && !registerTemplates);
+if (!skip) {
+// create statistics holder
+// for know we record only all the timings of a complete exchange 
(responses)
+// we have in-flight / total statistics already from camel-core
+Timer responses = 
registryService.getMetricsRegistry().timer(createName("responses"));
+statistics = new MetricsStatistics(route, responses);
+}
 }
 
 private String createName(String type) {
diff --git 
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc
index 17cf601e50c..379f81d2370 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc
@@ -39,3 +39,11 @@ listed from JMX will no longer include Kamelet routes.
 
 The old behaviour can be enabled by setting 
`registerRoutesCreateByKamelet=true`
 on the `ManagementAgent` object. See more in the xref:jmx.adoc[JMX] 
documentation.
+
+=== camel-micrometer and camel-metrics
+
+Due to Kamelets are changed to act more like a Camel component, and not expose 
internal details as JMX MBeans, then
+micrometer and metrics no longer include statistics for those Kamelet routes.
+
+The old behaviour can be enabled by setting 
`registerRoutesCreateByKamelet=true`
+on the `ManagementAgent` object. See more in the xref:jmx.adoc[JMX] 
documentation.



(camel) 11/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 901d43f1b0d3607aaebe3b86de08cb0cc166560f
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 14:06:31 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../camel/impl/engine/AbstractCamelContext.java| 27 +-
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index d99e3368c28..b3e2785fb00 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -31,6 +31,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import java.util.Set;
+import java.util.StringJoiner;
 import java.util.TreeSet;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -2650,19 +2651,21 @@ public abstract class AbstractCamelContext extends 
BaseService
 if (!registerTemplates) {
 newTotal -= templates;
 }
+StringJoiner sj = new StringJoiner(" ");
+sj.add("total:" + newTotal);
+if (total != started) {
+sj.add("started:" + started);
+}
 if (disabled > 0) {
-LOG.info("Routes startup (total:{} started:{} disabled:{})", 
newTotal, started, disabled);
-} else if (total != started) {
-LOG.info("Routes startup (total:{} started:{})", newTotal, 
started);
-} else {
-LOG.info("Routes startup (started:{})", started);
+sj.add("disabled:" + disabled);
 }
+LOG.info(String.format("Routes startup (%s)", sj));
 // if we are default/verbose then log each route line
 if (startupSummaryLevel == StartupSummaryLevel.Default || 
startupSummaryLevel == StartupSummaryLevel.Verbose) {
 for (String line : lines) {
 LOG.info(line);
 }
-if (startupSummaryLevel == StartupSummaryLevel.Verbose) {
+if (startupSummaryLevel == StartupSummaryLevel.Verbose && 
!configs.isEmpty()) {
 LOG.info("Routes configuration:");
 for (String line : configs) {
 LOG.info(line);
@@ -3103,13 +3106,15 @@ public abstract class AbstractCamelContext extends 
BaseService
 if (!registerTemplates) {
 newTotal -= templates;
 }
+StringJoiner sj = new StringJoiner(" ");
+sj.add("total:" + newTotal);
+if (total != stopped) {
+sj.add("stopped:" + stopped);
+}
 if (forced > 0) {
-logger.log(String.format("Routes stopped (total:%s stopped:%s 
forced:%s)", newTotal, stopped, forced));
-} else if (total != stopped) {
-logger.log(String.format("Routes stopped (total:%s 
stopped:%s)", newTotal, stopped));
-} else {
-logger.log(String.format("Routes stopped (stopped:%s)", 
stopped));
+sj.add("forced:" + forced);
 }
+logger.log(String.format("Routes stopped (%s)", sj));
 // if we are default/verbose then log each route line
 if (startupSummaryLevel == StartupSummaryLevel.Default || 
startupSummaryLevel == StartupSummaryLevel.Verbose) {
 for (String line : lines) {



(camel) 12/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit a374e9a867e57ad27ab5dc3ef55af60fc8a9bf00
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 14:25:23 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../camel/impl/engine/AbstractCamelContext.java| 28 +++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index b3e2785fb00..0b10e3ebe35 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -2588,7 +2588,8 @@ public abstract class AbstractCamelContext extends 
BaseService
 } else if (order.getRoute().isCreatedByRestDsl()) {
 rests++;
 }
-boolean skip = (!registerKamelets && 
order.getRoute().isCreatedByKamelet()) || (!registerTemplates && 
order.getRoute().isCreatedByRouteTemplate());
+boolean skip = order.getRoute().isCreatedByRestDsl()
+   ||  (!registerKamelets && 
order.getRoute().isCreatedByKamelet()) || (!registerTemplates && 
order.getRoute().isCreatedByRouteTemplate());
 if (!skip && ServiceStatus.Started.name().equals(status)) {
 started++;
 }
@@ -2625,7 +2626,7 @@ public abstract class AbstractCamelContext extends 
BaseService
 } else if (route.isCreatedByRestDsl()) {
 rests++;
 }
-boolean skip = (!registerKamelets && 
route.isCreatedByKamelet()) || (!registerTemplates && 
route.isCreatedByRouteTemplate());
+boolean skip = route.isCreatedByRestDsl() || 
(!registerKamelets && route.isCreatedByKamelet()) || (!registerTemplates && 
route.isCreatedByRouteTemplate());
 // use basic endpoint uri to not log verbose details or 
potential sensitive data
 String uri = route.getEndpoint().getEndpointBaseUri();
 uri = URISupport.sanitizeUri(uri);
@@ -2651,11 +2652,21 @@ public abstract class AbstractCamelContext extends 
BaseService
 if (!registerTemplates) {
 newTotal -= templates;
 }
+newTotal -= rests;
 StringJoiner sj = new StringJoiner(" ");
 sj.add("total:" + newTotal);
 if (total != started) {
 sj.add("started:" + started);
 }
+if (kamelets > 0) {
+sj.add("kamelets:" + kamelets);
+}
+if (templates > 0) {
+sj.add("templates:" + templates);
+}
+if (rests > 0) {
+sj.add("rest-dsl:" + rests);
+}
 if (disabled > 0) {
 sj.add("disabled:" + disabled);
 }
@@ -3084,7 +3095,8 @@ public abstract class AbstractCamelContext extends 
BaseService
 } else if (order.getRoute().isCreatedByRestDsl()) {
 rests++;
 }
-boolean skip = (!registerKamelets && 
order.getRoute().isCreatedByKamelet()) || (!registerTemplates && 
order.getRoute().isCreatedByRouteTemplate());
+boolean skip = order.getRoute().isCreatedByRestDsl()
+   || (!registerKamelets && 
order.getRoute().isCreatedByKamelet()) || (!registerTemplates && 
order.getRoute().isCreatedByRouteTemplate());
 if (!skip && ServiceStatus.Stopped.name().equals(status)) {
 stopped++;
 }
@@ -3106,11 +3118,21 @@ public abstract class AbstractCamelContext extends 
BaseService
 if (!registerTemplates) {
 newTotal -= templates;
 }
+newTotal -= rests;
 StringJoiner sj = new StringJoiner(" ");
 sj.add("total:" + newTotal);
 if (total != stopped) {
 sj.add("stopped:" + stopped);
 }
+if (kamelets > 0) {
+sj.add("kamelets:" + kamelets);
+}
+if (templates > 0) {
+sj.add("templates:" + templates);
+}
+if (rests > 0) {
+sj.add("rest-dsl:" + rests);
+}
 if (forced > 0) {
 sj.add("forced:" + forced);
 }



(camel) branch filter-kamelet2 created (now c6885b21b29)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git


  at c6885b21b29 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)

This branch includes the following new commits:

 new e8e531daaab CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new c25378da498 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new 5672c957fb3 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new 6c6ffe01723 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new 4962898894b CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new 7db463c170a CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new f23c0ec9e00 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new 9a9cb4f0294 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new b21ab0e29ca CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new c7214a7d188 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new 901d43f1b0d CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new a374e9a867e CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new 2c6995d51a6 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new cf38fd28d3b CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new ceb7e6fd322 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new 69537192604 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new 96d64fac99c CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new 94520652276 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)
 new c6885b21b29 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)

The 19 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




(camel) 06/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 7db463c170abc8ba450da2d9baca5a3e397206a8
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 10:58:52 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../component/kamelet/ManagedKameletRouteDisabledTest.java |  9 +
 ...meletRouteTest.java => ManagedKameletRouteEnabledTest.java} | 10 +-
 .../src/main/java/org/apache/camel/spi/ManagementAgent.java|  4 ++--
 .../org/apache/camel/management/DefaultManagementAgent.java|  2 +-
 .../modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc | 10 ++
 docs/user-manual/modules/ROOT/pages/jmx.adoc   |  8 +---
 6 files changed, 28 insertions(+), 15 deletions(-)

diff --git 
a/components/camel-kamelet/src/test/java/org/apache/camel/component/kamelet/ManagedKameletRouteDisabledTest.java
 
b/components/camel-kamelet/src/test/java/org/apache/camel/component/kamelet/ManagedKameletRouteDisabledTest.java
index 908c93248d4..bfa26bd1990 100644
--- 
a/components/camel-kamelet/src/test/java/org/apache/camel/component/kamelet/ManagedKameletRouteDisabledTest.java
+++ 
b/components/camel-kamelet/src/test/java/org/apache/camel/component/kamelet/ManagedKameletRouteDisabledTest.java
@@ -23,7 +23,6 @@ import java.util.UUID;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
-import org.apache.camel.CamelContext;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.test.junit5.CamelTestSupport;
@@ -46,13 +45,6 @@ public class ManagedKameletRouteDisabledTest extends 
CamelTestSupport {
 return 
context.getManagementStrategy().getManagementAgent().getMBeanServer();
 }
 
-@Override
-protected CamelContext createCamelContext() throws Exception {
-CamelContext context = super.createCamelContext();
-
context.getManagementStrategy().getManagementAgent().setRegisterRoutesCreateByKamelet(false);
-return context;
-}
-
 @Test
 public void testKameletRouteMBeanDisabled() throws Exception {
 String body = UUID.randomUUID().toString();
@@ -72,6 +64,7 @@ public class ManagedKameletRouteDisabledTest extends 
CamelTestSupport {
 ids.add(name);
 }
 assertTrue(ids.contains("direct"));
+// is disabled by default
 assertFalse(ids.contains("kamelet"));
 }
 
diff --git 
a/components/camel-kamelet/src/test/java/org/apache/camel/component/kamelet/ManagedKameletRouteTest.java
 
b/components/camel-kamelet/src/test/java/org/apache/camel/component/kamelet/ManagedKameletRouteEnabledTest.java
similarity index 88%
rename from 
components/camel-kamelet/src/test/java/org/apache/camel/component/kamelet/ManagedKameletRouteTest.java
rename to 
components/camel-kamelet/src/test/java/org/apache/camel/component/kamelet/ManagedKameletRouteEnabledTest.java
index 5c7a676c545..81df1c2d597 100644
--- 
a/components/camel-kamelet/src/test/java/org/apache/camel/component/kamelet/ManagedKameletRouteTest.java
+++ 
b/components/camel-kamelet/src/test/java/org/apache/camel/component/kamelet/ManagedKameletRouteEnabledTest.java
@@ -23,6 +23,7 @@ import java.util.UUID;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
+import org.apache.camel.CamelContext;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.test.junit5.CamelTestSupport;
@@ -33,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
-public class ManagedKameletRouteTest extends CamelTestSupport {
+public class ManagedKameletRouteEnabledTest extends CamelTestSupport {
 
 @Override
 protected boolean useJmx() {
@@ -44,6 +45,13 @@ public class ManagedKameletRouteTest extends 
CamelTestSupport {
 return 
context.getManagementStrategy().getManagementAgent().getMBeanServer();
 }
 
+@Override
+protected CamelContext createCamelContext() throws Exception {
+CamelContext context = super.createCamelContext();
+
context.getManagementStrategy().getManagementAgent().setRegisterRoutesCreateByKamelet(true);
+return context;
+}
+
 @Test
 public void testKameletRouteMBean() throws Exception {
 String body = UUID.randomUUID().toString();
diff --git 
a/core/camel-api/src/main/java/org/apache/camel/spi/ManagementAgent.java 
b/core/camel-api/src/main/java/org/apache/camel/spi/ManagementAgent.java
index 01b1257e3d9..214d5ddf4d6 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/ManagementAgent.java
+++ 

(camel) 03/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 5672c957fb35bbb69e6845c00dce1a7119e3f56e
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 10:18:30 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../java/org/apache/camel/spi/ManagementAgent.java | 28 ++
 .../api/management/JmxSystemPropertyKeys.java  |  6 +
 .../camel/management/DefaultManagementAgent.java   | 26 
 3 files changed, 60 insertions(+)

diff --git 
a/core/camel-api/src/main/java/org/apache/camel/spi/ManagementAgent.java 
b/core/camel-api/src/main/java/org/apache/camel/spi/ManagementAgent.java
index 4e1ee22dd01..01b1257e3d9 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/ManagementAgent.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/ManagementAgent.java
@@ -199,6 +199,34 @@ public interface ManagementAgent extends Service {
  */
 void setRegisterNewRoutes(Boolean registerNewRoutes);
 
+/**
+ * Whether to register mbeans for routes created by a Kamelet
+ * 
+ * This option is default true.
+ */
+Boolean getRegisterRoutesCreateByKamelet();
+
+/**
+ * Whether to register mbeans for routes created by a Kamelet
+ * 
+ * This option is default true.
+ */
+void setRegisterRoutesCreateByKamelet(Boolean 
registerRoutesCreateByKamelet);
+
+/**
+ * Whether to register mbeans for routes created by a route templates (not 
Kamelets)
+ * 
+ * This option is default true.
+ */
+Boolean getRegisterRoutesCreateByTemplate();
+
+/**
+ * Whether to register mbeans for routes created by a route templates (not 
Kamelets)
+ * 
+ * This option is default true.
+ */
+void setRegisterRoutesCreateByTemplate(Boolean 
registerRoutesCreateByTemplate);
+
 /**
  * Whether to remove detected sensitive information (such as passwords) 
from MBean names and attributes.
  * 
diff --git 
a/core/camel-management-api/src/main/java/org/apache/camel/api/management/JmxSystemPropertyKeys.java
 
b/core/camel-management-api/src/main/java/org/apache/camel/api/management/JmxSystemPropertyKeys.java
index 51eafd2897f..dfe24f32a79 100644
--- 
a/core/camel-management-api/src/main/java/org/apache/camel/api/management/JmxSystemPropertyKeys.java
+++ 
b/core/camel-management-api/src/main/java/org/apache/camel/api/management/JmxSystemPropertyKeys.java
@@ -52,6 +52,12 @@ public final class JmxSystemPropertyKeys {
 // whether to register when starting new routes
 public static final String REGISTER_NEW_ROUTES = 
"org.apache.camel.jmx.registerNewRoutes";
 
+// whether to register routes created by route templates (not kamelets)
+public static final String REGISTER_ROUTES_CREATED_BY_TEMPLATE = 
"org.apache.camel.jmx.registerRoutesCreateByTemplate";
+
+// whether to register routes created by Kamelets
+public static final String REGISTER_ROUTES_CREATED_BY_KAMELET = 
"org.apache.camel.jmx.registerRoutesCreateByKamelet";
+
 // Whether to remove detected sensitive information (such as passwords) 
from MBean names and attributes.
 public static final String MASK = "org.apache.camel.jmx.mask";
 
diff --git 
a/core/camel-management/src/main/java/org/apache/camel/management/DefaultManagementAgent.java
 
b/core/camel-management/src/main/java/org/apache/camel/management/DefaultManagementAgent.java
index ae761567c8a..beef93e89f8 100644
--- 
a/core/camel-management/src/main/java/org/apache/camel/management/DefaultManagementAgent.java
+++ 
b/core/camel-management/src/main/java/org/apache/camel/management/DefaultManagementAgent.java
@@ -69,6 +69,8 @@ public class DefaultManagementAgent extends ServiceSupport 
implements Management
 private Boolean endpointRuntimeStatisticsEnabled;
 private Boolean registerAlways = false;
 private Boolean registerNewRoutes = true;
+private Boolean registerRoutesCreateByKamelet = true;
+private Boolean registerRoutesCreateByTemplate = true;
 private Boolean mask = true;
 private Boolean includeHostName = false;
 private Boolean useHostIPAddress = false;
@@ -113,6 +115,14 @@ public class DefaultManagementAgent extends ServiceSupport 
implements Management
 registerNewRoutes = 
Boolean.getBoolean(JmxSystemPropertyKeys.REGISTER_NEW_ROUTES);
 values.put(JmxSystemPropertyKeys.REGISTER_NEW_ROUTES, 
registerNewRoutes);
 }
+if 
(System.getProperty(JmxSystemPropertyKeys.REGISTER_ROUTES_CREATED_BY_TEMPLATE) 
!= null) {
+registerRoutesCreateByTemplate = 
Boolean.getBoolean(JmxSystemPropertyKeys.REGISTER_ROUTES_CREATED_BY_TEMPLATE);
+
values.put(JmxSystemPropertyKeys.REGISTER_ROUTES_CREATED_BY_TEMPLATE, 

(camel) 08/19: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 9a9cb4f02940f144064264bc726115903049e915
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 11:36:58 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../apache/camel/management/mbean/ManagedCamelContext.java| 11 ---
 1 file changed, 11 deletions(-)

diff --git 
a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
 
b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
index 7f1fecc0631..c964039c948 100644
--- 
a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
+++ 
b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
@@ -790,15 +790,4 @@ public class ManagedCamelContext extends 
ManagedPerformanceCounter implements Ti
 }
 }
 
-/**
- * Used for sorting the routes mbeans accordingly to their ids.
- */
-private static final class RouteMBeans implements 
Comparator {
-
-@Override
-public int compare(ManagedRouteMBean o1, ManagedRouteMBean o2) {
-return o1.getRouteId().compareToIgnoreCase(o2.getRouteId());
-}
-}
-
 }



Re: [I] [CI] - Quarkus Main Branch Build Failure [camel-quarkus]

2024-02-24 Thread via GitHub


github-actions[bot] commented on issue #2926:
URL: https://github.com/apache/camel-quarkus/issues/2926#issuecomment-1962791283

   The 
[quarkus-main](https://github.com/apache/camel-quarkus/tree/quarkus-main) 
branch build has failed:
   
   * Build ID: 8034861300-1403-a1af5d8e-d62a-485f-ad2c-a99907c40334
   * Camel Quarkus Commit: b45244a0910a643dceee1926b113872f76fa9a12
   
   * Quarkus Main Commit: fd57971cd8d97d3c0cb3402f5d2f897248b2ce69
   * Link to build: 
https://github.com/apache/camel-quarkus/actions/runs/8034861300


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



[PR] [Github Actions] Periodic Sync Camel Spring Boot (Camel 4) [camel-spring-boot]

2024-02-24 Thread via GitHub


github-actions[bot] opened a new pull request, #1093:
URL: https://github.com/apache/camel-spring-boot/pull/1093

   Periodic Sync of Camel Spring Boot Main Branch with main Camel Main.
   see 
https://github.com/apache/camel-spring-boot/blob/main/.github/workflows/automatic-sync-main.yml


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



[PR] windows development compatibility changes [camel-karavan]

2024-02-24 Thread via GitHub


vidhyasagarj opened a new pull request, #1146:
URL: https://github.com/apache/camel-karavan/pull/1146

   Some non-impacting changes to make development compatible with Microsoft 
Windows. Open to any feedback. 


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



[PR] Remove duplicate dependency [camel-spring-boot]

2024-02-24 Thread via GitHub


Croway opened a new pull request, #1092:
URL: https://github.com/apache/camel-spring-boot/pull/1092

   `mvnd` complains about duplicated dependencies in the same pom.xml


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



Re: [PR] CAMEL-20460: Improve platform http log [camel]

2024-02-24 Thread via GitHub


Croway commented on PR #13285:
URL: https://github.com/apache/camel/pull/13285#issuecomment-1962399316

   ```
   [l.example.MyApplication.main()] MainHttpServer INFO  HTTP 
endpoints summary
   [l.example.MyApplication.main()] MainHttpServer INFO  
http://0.0.0.0:8080/   (POST)   (accept: application/json)   (produce: 
application/json)
   [l.example.MyApplication.main()] MainHttpServer INFO  
http://0.0.0.0:8080/q/dev   (produce: text/plain,application/json)
   [l.example.MyApplication.main()] MainHttpServer INFO  
http://0.0.0.0:8080/q/health   (produce: application/json)
   [l.example.MyApplication.main()] MainHttpServer INFO  
http://0.0.0.0:8080/q/jolokia   (produce: text/plain,application/json)
   ```


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



Re: [PR] CAMEL-20460: Improve platform http log [camel]

2024-02-24 Thread via GitHub


github-actions[bot] commented on PR #13285:
URL: https://github.com/apache/camel/pull/13285#issuecomment-1962397377

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :robot: CI automation will test this PR automatically.
   
   :camel: Apache Camel Committers, please review the following items:
   
   * First-time contributors **require MANUAL approval** for the GitHub Actions 
to run
   
   * You can use the command `/component-test (camel-)component-name1 
(camel-)component-name2..` to request a test from the test bot.
   
   * You can label PRs using `build-all`, `build-dependents`, `skip-tests` and 
`test-dependents` to fine-tune the checks executed by this PR.
   
   * Build and test logs are available in the Summary page. **Only** [Apache 
Camel committers](https://camel.apache.org/community/team/#committers) have 
access to the summary. 
   
   * :warning: Be careful when sharing logs. Review their contents before 
sharing them publicly.


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



[PR] CAMEL-20460: Improve platform http log [camel]

2024-02-24 Thread via GitHub


Croway opened a new pull request, #13285:
URL: https://github.com/apache/camel/pull/13285

   Output log from example:
   ```
   [l.example.MyApplication.main()] MainHttpServer INFO  HTTP 
endpoints summary
   [l.example.MyApplication.main()] MainHttpServer INFO  
http://0.0.0.0:8080/ (POST) accept: application/json produce: application/json
   [l.example.MyApplication.main()] MainHttpServer INFO  
http://0.0.0.0:8080/q/dev produce: text/plain,application/json
   [l.example.MyApplication.main()] MainHttpServer INFO  
http://0.0.0.0:8080/q/health produce: application/json
   [l.example.MyApplication.main()] MainHttpServer INFO  
http://0.0.0.0:8080/q/jolokia produce: text/plain,application/json
   ```


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



Re: [PR] reload kamelets on file editor route #1134 [camel-karavan]

2024-02-24 Thread via GitHub


mgubaidullin commented on code in PR #1140:
URL: https://github.com/apache/camel-karavan/pull/1140#discussion_r1501559973


##
karavan-generator/src/main/java/org/apache/camel/karavan/generator/KaravanGenerator.java:
##


Review Comment:
   Thank for that



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



Re: [PR] feat(camel-main): add options to let the shutdown strategy to wait or ignore inflight messages [camel]

2024-02-24 Thread via GitHub


lburgazzoli commented on PR #13273:
URL: https://github.com/apache/camel/pull/13273#issuecomment-1962358545

   If you don't see this generally applicable to camel-main, we can retain the 
behavior in camel-k without problems


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



Re: [PR] feat(camel-main): add options to let the shutdown strategy to wait or ignore inflight messages [camel]

2024-02-24 Thread via GitHub


lburgazzoli commented on PR #13273:
URL: https://github.com/apache/camel/pull/13273#issuecomment-1962350520

   > This can lead to waiting forever as if the system keeps taking in new 
inflight messages, as this will never issue the shutdown strategy to begin 
shutting down. The shutdown strategy automatic let inflight messages complete 
(it has a timeout of 45 seconds). So with this in mind I think the current way 
should cover this.
   > 
   > What is it that you see that dont work today?
   
   This implementation is meant to explore how to move come logic that exists 
in the camel-k-runtime (the cron support) to camel so we can remove camel-k 
specific logic and have a generic solution. 
   
   What camel-k does is:
   - to let Kubernetes handle job scheduling (leveraging the 
[Job](https://kubernetes.io/docs/concepts/workloads/controllers/job/) resource) 
instead of using the native one so the JVM does not requires to be always up 
and running
   - to let Kubernetes natively handle 
[timeout/deadlines](https://kubernetes.io/docs/concepts/workloads/controllers/job/#job-termination-and-cleanup)
   - to trigger the execution of the route, camel-k replace the scheduling 
component with a 1 shot timer event.
   
   I knew about the shutdown timeout, but given the point above, the 
expectation is that the shutdown is not even triggered till all the task have 
been completed. So theoretically by setting a very high timeout you could 
achieve the same result, but you would see an entry in the log about the 
context being shutting down which may be confusing.
   
   Still I don't really know if my implementation is correct or not, maybe we 
could think about a pluggable hook to let inject custom semantics.
   
   > 
   > Also if something needs to be added then why are the 2 options false and 
true by default, can we not have just one option instead. Camel already have 
too many options and can confuse users.
   
   I first had a single parameter, hover I noticed that the idle task, [take 
into account the inflight 
messages](https://github.com/apache/camel/blob/214ebc1f93790fe60d93d0c1e44fabdf51ae541f/core/camel-main/src/main/java/org/apache/camel/main/MainDurationEventNotifier.java#L248)
 before triggering the shutdown so to preserve the current behavior, I added a 
second option 


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



Re: [PR] CAMEL-20459: EIP doc fixes [camel]

2024-02-24 Thread via GitHub


github-actions[bot] commented on PR #13284:
URL: https://github.com/apache/camel/pull/13284#issuecomment-1962349726

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :robot: CI automation will test this PR automatically.
   
   :camel: Apache Camel Committers, please review the following items:
   
   * First-time contributors **require MANUAL approval** for the GitHub Actions 
to run
   
   * You can use the command `/component-test (camel-)component-name1 
(camel-)component-name2..` to request a test from the test bot.
   
   * You can label PRs using `build-all`, `build-dependents`, `skip-tests` and 
`test-dependents` to fine-tune the checks executed by this PR.
   
   * Build and test logs are available in the Summary page. **Only** [Apache 
Camel committers](https://camel.apache.org/community/team/#committers) have 
access to the summary. 
   
   * :warning: Be careful when sharing logs. Review their contents before 
sharing them publicly.


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



[PR] CAMEL-20459: EIP doc fixes [camel]

2024-02-24 Thread via GitHub


orpiske opened a new pull request, #13284:
URL: https://github.com/apache/camel/pull/13284

   (no comment)


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



(camel) branch regen_bot updated (44614fbe08a -> 214ebc1f937)

2024-02-24 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch regen_bot
in repository https://gitbox.apache.org/repos/asf/camel.git


from 44614fbe08a Regen
 add d7d6a6c1f53 CAMEL-20457: camel-core - Fix NPE in split parallel 
timeout without agg strategy. (#13282)
 add 58b27ef3a27 CAMEL-20459: documentation fixes for the aggregate EIP.
 add 1fca7f53b76 CAMEL-20459: documentation fixes for the bean EIP.
 add 10ccde784d4 CAMEL-20459: documentation fixes for the CDC EIP.
 add 1b25675caa0 CAMEL-20459: documentation fixes for the channel adapter 
EIP.
 add 214ebc1f937 CAMEL-20459: documentation fixes for the choice EIP.

No new revisions were added by this update.

Summary of changes:
 .../docs/modules/eips/pages/aggregate-eip.adoc | 127 ++---
 .../src/main/docs/modules/eips/pages/bean-eip.adoc |  17 ++-
 .../modules/eips/pages/change-data-capture.adoc|   8 +-
 .../docs/modules/eips/pages/channel-adapter.adoc   |   4 +-
 .../main/docs/modules/eips/pages/choice-eip.adoc   |  36 +++---
 .../apache/camel/processor/MulticastProcessor.java |   7 +-
 ...tParallelTimeoutNoAggregationStrategyTest.java} |  40 +++
 7 files changed, 121 insertions(+), 118 deletions(-)
 copy 
core/camel-core/src/test/java/org/apache/camel/processor/{MulticastParallelLastTimeoutTest.java
 => SplitParallelTimeoutNoAggregationStrategyTest.java} (65%)



(camel) 03/05: CAMEL-20459: documentation fixes for the CDC EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 10ccde784d444e2b669ec05ffd50dac6927dfd07
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 09:45:49 2024 +0100

CAMEL-20459: documentation fixes for the CDC EIP.

Signed-off-by: Otavio R. Piske 
---
 .../src/main/docs/modules/eips/pages/change-data-capture.adoc | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/change-data-capture.adoc
 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/change-data-capture.adoc
index 34652a65aea..466c3e9d2e5 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/change-data-capture.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/change-data-capture.adoc
@@ -3,13 +3,15 @@
 Camel supports the https://en.wikipedia.org/wiki/Change_data_capture[Change 
Data Capture] pattern.
 
 This pattern allows tracking changes in databases, and then let applications 
listen to change events,
-and react accordingly. For example this can be used as a 
xref:messaging-bridge.adoc[Messaging Bridge] to
+and react accordingly.
+For example, this can be used as a xref:messaging-bridge.adoc[Messaging 
Bridge] to
 bridge two systems.
 
 image::eip/CDC-Debezium.png[image]
 
-Camel integrates with https://debezium.io/[Debezium] which is a CDC system. 
There are a number of Camel Debezium
-components that works with different databases such as MySQL, Postgres, and 
MongoDB.
+Camel integrates with https://debezium.io/[Debezium], which is a CDC system.
+There are a number of Camel Debezium
+components that work with different databases such as MySQL, Postgres, and 
MongoDB.
 
 == Example
 



(camel) 02/05: CAMEL-20459: documentation fixes for the bean EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 1fca7f53b76c98f61559c8b4679a4a47a5e101b9
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 09:44:33 2024 +0100

CAMEL-20459: documentation fixes for the bean EIP.

Signed-off-by: Otavio R. Piske 
---
 .../src/main/docs/modules/eips/pages/bean-eip.adoc  | 17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/bean-eip.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/bean-eip.adoc
index be27c309b41..023c6555204 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/bean-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/bean-eip.adoc
@@ -19,7 +19,7 @@ which also is used for invoking beans, but in the form as a 
Camel component.
 bean:beanID[?options]
 
 
-Where *beanID* can be any string which is used to look up the bean in
+Where *beanID* can be any string used to look up the bean in
 the xref:manual::registry.adoc[Registry].
 
 == EIP options
@@ -37,7 +37,7 @@ include::partial$eip-exchangeProperties.adoc[]
 === Bean scope
 
 When using `singleton` scope (default) the bean is created or looked up only 
once and reused for the lifetime of the endpoint.
-The bean should be thread-safe in case concurrent threads is calling the bean 
at the same time.
+The bean should be thread-safe in case concurrent threads are calling the bean 
at the same time.
 
 When using `request` scope the bean is created or looked up once per request 
(exchange). This can be used if you want to store state on a bean
 while processing a request, and you want to call the same bean instance 
multiple times while processing the request.
@@ -108,8 +108,8 @@ YAML::
 
 
 
-Instead of passing name of the reference to the bean (so that Camel will
-lookup for it in the registry), you can provide the bean:
+Instead of passing the name of the reference to the bean (so that Camel will
+look up for it in the registry), you can provide the bean:
 
 [tabs]
 
@@ -117,13 +117,13 @@ Java::
 +
 [source,java]
 
-// Send message to the given bean instance.
+// Send a message to the given bean instance.
 from("direct:foo").bean(new ExampleBean());
 
 // Explicit selection of bean method to be invoked.
 from("direct:bar").bean(new ExampleBean(), "myMethod");
 
-// Camel will create a singleton instance of the bean, and reuse the instance 
for following calls (see scope)
+// Camel will create a singleton instance of the bean, and reuse the instance 
for the following calls (see scope)
 from("direct:cheese").bean(ExampleBean.class);
 
 
@@ -175,6 +175,5 @@ YAML::
 How bean methods to be invoked are chosen (if they are not specified
 explicitly through the *method* parameter) and how parameter values are
 constructed from the xref:message.adoc[Message] are all defined by the
-xref:manual::bean-binding.adoc[Bean Binding] mechanism which is used throughout
-all the various xref:manual::bean-integration.adoc[Bean Integration]
-mechanisms in Camel.
+xref:manual::bean-binding.adoc[Bean Binding] mechanism.
+This is used throughout all the various 
xref:manual::bean-integration.adoc[Bean Integration] mechanisms in Camel.



(camel) 01/05: CAMEL-20459: documentation fixes for the aggregate EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 58b27ef3a27b1513fba41372d15ea9d70cee85e5
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 09:32:01 2024 +0100

CAMEL-20459: documentation fixes for the aggregate EIP.

Signed-off-by: Otavio R. Piske 
---
 .../docs/modules/eips/pages/aggregate-eip.adoc | 127 ++---
 1 file changed, 63 insertions(+), 64 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/aggregate-eip.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/aggregate-eip.adoc
index 7188c5d3929..1dcff1dfcec 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/aggregate-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/aggregate-eip.adoc
@@ -9,9 +9,9 @@
 The
 http://www.enterpriseintegrationpatterns.com/Aggregator.html[Aggregator]
 from the xref:enterprise-integration-patterns.adoc[EIP patterns] allows
-you to combine a number of messages together into a single message.
+you to combine a number of messages into a single message.
 
-How do we combine the results of individual, but related messages so that they 
can be processed as a whole?
+How do we combine the results of individual, but related, messages so that 
they can be processed as a whole?
 
 image::eip/Aggregator.gif[image]
 
@@ -20,7 +20,7 @@ Use a stateful filter, an Aggregator, to collect and store 
individual messages u
 The aggregator is one of the most complex EIP and has many features and 
configurations.
 
 The logic for combing messages together is _correlated_ in buckets based on a 
_correlation key_.
-Messages with the same correlation key is aggregated together, using an 
`AggregationStrategy`.
+Messages with the same correlation key are aggregated together, using an 
`AggregationStrategy`.
 
 == Aggregate options
 
@@ -36,14 +36,14 @@ include::partial$eip-exchangeProperties.adoc[]
 
 == Worker pools
 
-The aggregate EIP will always use a worker pool, that is used to process all 
the outgoing messages from the aggregator.
+The aggregate EIP will always use a worker pool used to process all the 
outgoing messages from the aggregator.
 The worker pool is determined accordingly:
 
 - If a custom `ExecutorService` has been configured, then this is used as 
worker pool.
 - If `parallelProcessing=true` then a _default_ worker pool (is 10 worker 
threads by default) is created.
 However, the thread pool size and other configurations can be configured using 
_thread pool profiles_.
 - Otherwise, a single threaded worker pool is created.
-- In order to achieve synchronous aggregation, use an instance of 
`SynchronousExecutorService` for the
+- To achieve synchronous aggregation, use an instance of 
`SynchronousExecutorService` for the
 `executorService` option. The aggregated output will execute in the same 
thread that called the aggregator.
 
 == Aggregating
@@ -52,9 +52,10 @@ The `AggregationStrategy` is used for aggregating the old, 
and the new exchanges
 that becomes the next old, when the next message is aggregated, and so forth.
 
 Possible implementations include performing some kind of combining or
-delta processing, such as adding line items together into an invoice or
+delta processing.
+For instance, adding line items together into an invoice or
 just using the newest exchange and removing old exchanges such as for
-state tracking or market data prices; where old values are of little
+state tracking or market data prices, where old values are of little
 use.
 
 Notice the aggregation strategy is a mandatory option and must be
@@ -115,8 +116,8 @@ In the route below we group all the exchanges together using
 [source,java]
 
 from("direct:start")
-// aggregate all using same expression and group the
-// exchanges so we get one single exchange containing all
+// aggregates all using the same expression and group the
+// exchanges, so we get one single exchange containing all
 // the others
 .aggregate(new GroupedExchangeAggregationStrategy()).constant(true)
 // wait for 0.5 seconds to aggregate
@@ -142,10 +143,10 @@ then you can use the
 `org.apache.camel.processor.aggregate.AbstractListAggregationStrategy`
 abstract class.
 
-The completed Exchange that is sent out of the aggregator will contain the 
`List` in
+The completed Exchange sent out of the aggregator will contain the `List` in
 the message body.
 
-For example to aggregate a `List` you can extend this class as
+For example, to aggregate a `List` you can extend this class as
 shown below, and implement the `getValue` method:
 
 [source,java]
@@ -154,7 +155,7 @@ public class MyListOfNumbersStrategy extends 
AbstractListAggregationStrategy` as shown:
+When using Spring XML, you can create the bean with `` as shown:
 
 [source,xml]
 
@@ -441,26 +440,26 @@ To use the `AggregationStrategy` you had to 

(camel) 05/05: CAMEL-20459: documentation fixes for the choice EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 214ebc1f93790fe60d93d0c1e44fabdf51ae541f
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 09:51:53 2024 +0100

CAMEL-20459: documentation fixes for the choice EIP.

Signed-off-by: Otavio R. Piske 
---
 .../main/docs/modules/eips/pages/choice-eip.adoc   | 36 --
 1 file changed, 20 insertions(+), 16 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc
index 9ef01c7579b..c869dfb0274 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc
@@ -7,8 +7,7 @@
 :tabs-sync-option:
 
 The
-http://www.enterpriseintegrationpatterns.com/ContentBasedRouter.html[Content
-Based Router] from the xref:enterprise-integration-patterns.adoc[EIP
+http://www.enterpriseintegrationpatterns.com/ContentBasedRouter.html[Content-Based
 Router] from the xref:enterprise-integration-patterns.adoc[EIP
 patterns] allows you to route messages to the correct destination based
 on the contents of the message exchanges.
 
@@ -94,12 +93,12 @@ YAML::
 
 
 
-=== Why can I not use otherwise in Java DSL
+=== Why can I not use otherwise in Java DSL?
 
 When using the Choice EIP in the Java DSL you may have a situation where the 
compiler will not accept
 `when()` or `otherwise()` statements.
 
-For example as shown in the route below where we use the
+For example, as shown in the route below where we use the
 xref:loadBalance-eip.adoc[Load Balancer] EIP inside the Choice EIP in the 
first when:
 
 *Code will not compile*
@@ -114,9 +113,9 @@ from("direct:start")
 .to("mock:result");
 
 
-Well the first issue is that the xref:loadBalance-eip.adoc[Load Balancer] EIP
+Well, the first issue is that the xref:loadBalance-eip.adoc[Load Balancer] EIP
 uses the additional routing to know what to use in the load balancing.
-In this example that would be the:
+In this example, that would be:
 
 [source,java]
 
@@ -124,7 +123,8 @@ In this example that would be the:
 
 
 To indicate when the balancing stops, you should use `.end()` to denote
-the end. So the route is updates as follows:
+the end.
+So the route is updated as follows:
 
 *Code will still not compile*
 
@@ -163,9 +163,10 @@ from("direct:start")
 
 You only need to use `.endChoice()` when using certain
 xref:eips:enterprise-integration-patterns.adoc[EIP]s which often have 
additional
-methods to configure or as part of the EIP itself. For example the
-xref:split-eip.adoc[Split] EIP has a sub-route which denotes the
-routing of each _split_ message. You would also have to use
+methods to configure or as part of the EIP itself.
+For example, the xref:split-eip.adoc[Split] EIP has a sub-route which denotes 
the
+routing of each _split_ message.
+You would also have to use
 `.endChoice()` to indicate the end of the sub-route and to return
 to the Choice EIP.
 
@@ -181,9 +182,11 @@ generics you can do in Java programming language.
 
 == Precondition Mode
 
-In precondition mode, the Choice EIP is an optimized 
http://www.enterpriseintegrationpatterns.com/ContentBasedRouter.html[Content
-Based Router] which selects a single branch (when/otherwise) during startup, 
and
-always executes the same branch. This allows to optimize the runtime Camel to 
avoid
+In precondition mode,
+the Choice EIP is an optimized 
http://www.enterpriseintegrationpatterns.com/ContentBasedRouter.html[Content-Based
 Router]
+that selects a single branch (when/otherwise) during startup,
+and always executes the same branch.
+This allows optimizing the runtime Camel to avoid
 this evaluation process for every message; because they are supposed
 to always be routed on the same branch.
 
@@ -192,8 +195,9 @@ cannot be based on the content of the message. Therefore, 
the predicates would o
 be based on property placeholders, JVM system properties, or OS Environment 
variables.
 
 The Choice EIP in precondition mode combined with 
xref:manual:ROOT:route-template.adoc[Route Templates] allows
-for more flexible templates, as the template parameters can be used as the 
predicates in the Choice EIP;
-meaning that the Choice EIP in precondition mode is fully parameterized, but 
is optimized for best runtime performance.
+for more flexible templates, as the template parameters can be used as the 
predicates in the Choice EIP.
+This means that the Choice EIP in precondition mode is fully parameterized,
+but is optimized for the best runtime performance.
 
 === Example
 
@@ -262,4 +266,4 @@ YAML::
 
 
 
-TIP: Otherwise, is optional, and if none of the predicates would match, then 
no branches is selected.
+TIP: Otherwise, it is optional, and if none of the predicate matches, then 

(camel) 04/05: CAMEL-20459: documentation fixes for the channel adapter EIP.

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 1b25675caa060e925d514db9e1b690e8f1d2566f
Author: Otavio R. Piske 
AuthorDate: Sat Feb 24 09:47:06 2024 +0100

CAMEL-20459: documentation fixes for the channel adapter EIP.

Signed-off-by: Otavio R. Piske 
---
 .../src/main/docs/modules/eips/pages/channel-adapter.adoc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/channel-adapter.adoc 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/channel-adapter.adoc
index 91a4b50de2a..4cf89452f75 100644
--- 
a/core/camel-core-engine/src/main/docs/modules/eips/pages/channel-adapter.adoc
+++ 
b/core/camel-core-engine/src/main/docs/modules/eips/pages/channel-adapter.adoc
@@ -13,7 +13,7 @@ channel based on this data, and that likewise can receive 
messages and invoke fu
 inside the application.
 
 The Channel Adapter is implemented in Camel by components.
-Each component adapters between the systems and Camel where all details are 
hidden in the implementation
+Each component adapter between the systems and Camel where all details are 
hidden in the implementation
 of the component, which allows applications to easily send and receive data.
 
 == Example
@@ -29,7 +29,7 @@ from("kafka:cheese?brokers={{kafka.host}}:{{kafka.port}}"
 .to("bean:cheeseBean");
 
 
-And the bean has method which accepts the message payload as a byte array.
+And the bean has a method which accepts the message payload as a byte array.
 
 [source,java]
 



(camel) branch main updated (d7d6a6c1f53 -> 214ebc1f937)

2024-02-24 Thread orpiske
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


from d7d6a6c1f53 CAMEL-20457: camel-core - Fix NPE in split parallel 
timeout without agg strategy. (#13282)
 new 58b27ef3a27 CAMEL-20459: documentation fixes for the aggregate EIP.
 new 1fca7f53b76 CAMEL-20459: documentation fixes for the bean EIP.
 new 10ccde784d4 CAMEL-20459: documentation fixes for the CDC EIP.
 new 1b25675caa0 CAMEL-20459: documentation fixes for the channel adapter 
EIP.
 new 214ebc1f937 CAMEL-20459: documentation fixes for the choice EIP.

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../docs/modules/eips/pages/aggregate-eip.adoc | 127 ++---
 .../src/main/docs/modules/eips/pages/bean-eip.adoc |  17 ++-
 .../modules/eips/pages/change-data-capture.adoc|   8 +-
 .../docs/modules/eips/pages/channel-adapter.adoc   |   4 +-
 .../main/docs/modules/eips/pages/choice-eip.adoc   |  36 +++---
 5 files changed, 98 insertions(+), 94 deletions(-)



Re: [PR] CAMEL-20459: documentation fixes for the EIPs [camel]

2024-02-24 Thread via GitHub


orpiske merged PR #13283:
URL: https://github.com/apache/camel/pull/13283


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



Re: [PR] feat(camel-main): add options to let the shutdown strategy to wait or ignore inflight messages [camel]

2024-02-24 Thread via GitHub


davsclaus commented on PR #13273:
URL: https://github.com/apache/camel/pull/13273#issuecomment-1962317365

   This can lead to waiting forever as if the system keeps taking in new 
inflight messages, as this will never issue the shutdown strategy to begin 
shutting down. The shutdown strategy automatic let inflight messages complete 
(it has a timeout of 45 seconds). So with this in mind I think the current way 
should cover this.
   
   What is it that you see that dont work today?
   
   Also if something needs to be added then why are the 2 options false and 
true by default, can we not have just one option instead. Camel already have 
too many options and can confuse users.
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



(camel) 01/01: CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, so we can filter out in tooling and whereelse (kamelet is a blackbox)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch filter-kamelet
in repository https://gitbox.apache.org/repos/asf/camel.git

commit fdddb8df5210afb5ce310886d9092170490c3414
Author: Claus Ibsen 
AuthorDate: Thu Feb 22 13:00:17 2024 +0100

CAMEL-18858: camel-core - Mark route as created by Kamelet so we know this, 
so we can filter out in tooling and whereelse (kamelet is a blackbox)
---
 .../java/org/apache/camel/component/kamelet/Kamelet.java |  2 ++
 core/camel-api/src/main/java/org/apache/camel/Route.java |  1 +
 .../java/org/apache/camel/model/RouteDefinition.java | 16 +++-
 .../main/java/org/apache/camel/reifier/RouteReifier.java |  2 ++
 .../camel/api/management/mbean/ManagedRouteMBean.java|  6 ++
 .../org/apache/camel/management/mbean/ManagedRoute.java  | 10 ++
 .../java/org/apache/camel/xml/in/ModelParser.java|  1 +
 .../java/org/apache/camel/xml/out/ModelWriter.java   |  1 +
 .../java/org/apache/camel/yaml/out/ModelWriter.java  |  1 +
 9 files changed, 39 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/Kamelet.java
 
b/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/Kamelet.java
index bda62f27103..3db8c6f8250 100644
--- 
a/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/Kamelet.java
+++ 
b/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/Kamelet.java
@@ -130,6 +130,8 @@ public final class Kamelet {
 ObjectHelper.notNull(rid, PARAM_ROUTE_ID);
 
 RouteDefinition def = in.asRouteDefinition();
+// mark this as created from a kamelet
+def.setKamelet(true);
 def.setLocation(in.getLocation());
 def.setLineNumber(in.getLineNumber());
 def.setId(rid);
diff --git a/core/camel-api/src/main/java/org/apache/camel/Route.java 
b/core/camel-api/src/main/java/org/apache/camel/Route.java
index a7d0f0cd054..e44c6263cf6 100644
--- a/core/camel-api/src/main/java/org/apache/camel/Route.java
+++ b/core/camel-api/src/main/java/org/apache/camel/Route.java
@@ -47,6 +47,7 @@ public interface Route extends RuntimeConfiguration {
 String NODE_PREFIX_ID_PROPERTY = "nodePrefixId";
 String REST_PROPERTY = "rest";
 String TEMPLATE_PROPERTY = "template";
+String KAMELET_PROPERTY = "kamelet";
 String DESCRIPTION_PROPERTY = "description";
 String CONFIGURATION_ID_PROPERTY = "configurationId";
 String SUPERVISED = "supervised";
diff --git 
a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java
 
b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java
index 7b274a5ef1c..aa78b73fdc4 100644
--- 
a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java
+++ 
b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java
@@ -86,6 +86,7 @@ public class RouteDefinition extends 
OutputDefinition
 private boolean contextScopedErrorHandler = true;
 private Boolean rest;
 private Boolean template;
+private Boolean kamelet;
 private RestDefinition restDefinition;
 private RestBindingDefinition restBindingDefinition;
 private InputTypeDefinition inputType;
@@ -1178,7 +1179,7 @@ public class RouteDefinition extends 
OutputDefinition
 }
 
 /**
- * This route is created from a route template.
+ * This route is created from a route template (or from a Kamelet).
  */
 public void setTemplate(Boolean template) {
 this.template = template;
@@ -1190,6 +1191,19 @@ public class RouteDefinition extends 
OutputDefinition
 return template;
 }
 
+/**
+ * This route is created from a Kamelet.
+ */
+public void setKamelet(Boolean kamelet) {
+this.kamelet = kamelet;
+}
+
+@XmlAttribute
+@Metadata(label = "advanced")
+public Boolean isKamelet() {
+return kamelet;
+}
+
 public RestDefinition getRestDefinition() {
 return restDefinition;
 }
diff --git 
a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/RouteReifier.java
 
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/RouteReifier.java
index 31a92c2582e..a41d8cbf34c 100644
--- 
a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/RouteReifier.java
+++ 
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/RouteReifier.java
@@ -395,6 +395,8 @@ public class RouteReifier extends 
ProcessorReifier {
 routeProperties.put(Route.REST_PROPERTY, rest);
 String template = Boolean.toString(definition.isTemplate() != null && 
definition.isTemplate());
 routeProperties.put(Route.TEMPLATE_PROPERTY, template);
+String kamelet = Boolean.toString(definition.isKamelet() != null && 
definition.isKamelet());
+routeProperties.put(Route.KAMELET_PROPERTY, kamelet);
 if 

(camel) branch filter-kamelet created (now fdddb8df521)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch filter-kamelet
in repository https://gitbox.apache.org/repos/asf/camel.git


  at fdddb8df521 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)

This branch includes the following new commits:

 new fdddb8df521 CAMEL-18858: camel-core - Mark route as created by Kamelet 
so we know this, so we can filter out in tooling and whereelse (kamelet is a 
blackbox)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




Re: [PR] CAMEL-20459: documentation fixes for the EIPs [camel]

2024-02-24 Thread via GitHub


orpiske commented on PR #13283:
URL: https://github.com/apache/camel/pull/13283#issuecomment-1962302445

   Marking as a draft for now, as I'll merge later. I'm still adding a few 
changes. 


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



(camel) branch split deleted (was ced01fcee8d)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch split
in repository https://gitbox.apache.org/repos/asf/camel.git


 was ced01fcee8d CAMEL-20457: camel-core - Fix NPE in split parallel 
timeout without agg strategy.

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



(camel) branch camel-3.21.x updated: CAMEL-20457: camel-core - Fix NPE in split parallel timeout without agg strategy. (#13282)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-3.21.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-3.21.x by this push:
 new cb8550337c4 CAMEL-20457: camel-core - Fix NPE in split parallel 
timeout without agg strategy. (#13282)
cb8550337c4 is described below

commit cb8550337c4de99df981ea91ef47b954add6b8d4
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 09:44:17 2024 +0100

CAMEL-20457: camel-core - Fix NPE in split parallel timeout without agg 
strategy. (#13282)
---
 .../apache/camel/processor/MulticastProcessor.java |  7 +-
 ...itParallelTimeoutNoAggregationStrategyTest.java | 79 ++
 2 files changed, 84 insertions(+), 2 deletions(-)

diff --git 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
index 94fec20d1c3..b11235a0e59 100644
--- 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
+++ 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
@@ -470,9 +470,12 @@ public class MulticastProcessor extends 
AsyncProcessorSupport
 Exchange exchange = completion.pollUnordered();
 int index = exchange != null ? 
getExchangeIndex(exchange) : nbExchangeSent.get();
 while (nbAggregated.get() < index) {
+int idx = nbAggregated.getAndIncrement();
 AggregationStrategy strategy = 
getAggregationStrategy(null);
-strategy.timeout(result.get() != null ? 
result.get() : original,
-nbAggregated.getAndIncrement(), 
nbExchangeSent.get(), timeout);
+if (strategy != null) {
+strategy.timeout(result.get() != null ? 
result.get() : original,
+idx, nbExchangeSent.get(), timeout);
+}
 }
 if (exchange != null) {
 doAggregate(result, exchange, original);
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/SplitParallelTimeoutNoAggregationStrategyTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/SplitParallelTimeoutNoAggregationStrategyTest.java
new file mode 100644
index 000..6464d4da4bd
--- /dev/null
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/SplitParallelTimeoutNoAggregationStrategyTest.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.processor;
+
+import java.util.concurrent.Phaser;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.jupiter.api.Assumptions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+import org.junit.jupiter.api.parallel.Isolated;
+
+@Isolated
+@Timeout(60)
+public class SplitParallelTimeoutNoAggregationStrategyTest extends 
ContextTestSupport {
+
+private final Phaser phaser = new Phaser(3);
+
+@BeforeEach
+void sendEarly() {
+Assumptions.assumeTrue(context.isStarted(), "The test cannot be run 
because the context is not started");
+template.sendBody("direct:start", "A,B,C");
+}
+
+@Test
+public void testSplitTimeout() throws Exception {
+MockEndpoint mock = getMockEndpoint("mock:result");
+// A will timeout so we only get B and/or C
+mock.message(0).body().not(body().contains("A"));
+
+phaser.awaitAdvanceInterruptibly(0, 5000, TimeUnit.SECONDS);
+
+assertMockEndpointsSatisfied();
+}
+
+@Override
+protected RouteBuilder createRouteBuilder() throws Exception {
+return new RouteBuilder() {
+@Override
+public void configure() throws 

(camel) branch camel-3.22.x updated: CAMEL-20457: camel-core - Fix NPE in split parallel timeout without agg strategy. (#13282)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-3.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-3.22.x by this push:
 new 9fc91e2ca58 CAMEL-20457: camel-core - Fix NPE in split parallel 
timeout without agg strategy. (#13282)
9fc91e2ca58 is described below

commit 9fc91e2ca58decfbe77524402aef8ca06cfe0410
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 09:44:17 2024 +0100

CAMEL-20457: camel-core - Fix NPE in split parallel timeout without agg 
strategy. (#13282)
---
 .../apache/camel/processor/MulticastProcessor.java |  7 +-
 ...itParallelTimeoutNoAggregationStrategyTest.java | 79 ++
 2 files changed, 84 insertions(+), 2 deletions(-)

diff --git 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
index 94fec20d1c3..b11235a0e59 100644
--- 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
+++ 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
@@ -470,9 +470,12 @@ public class MulticastProcessor extends 
AsyncProcessorSupport
 Exchange exchange = completion.pollUnordered();
 int index = exchange != null ? 
getExchangeIndex(exchange) : nbExchangeSent.get();
 while (nbAggregated.get() < index) {
+int idx = nbAggregated.getAndIncrement();
 AggregationStrategy strategy = 
getAggregationStrategy(null);
-strategy.timeout(result.get() != null ? 
result.get() : original,
-nbAggregated.getAndIncrement(), 
nbExchangeSent.get(), timeout);
+if (strategy != null) {
+strategy.timeout(result.get() != null ? 
result.get() : original,
+idx, nbExchangeSent.get(), timeout);
+}
 }
 if (exchange != null) {
 doAggregate(result, exchange, original);
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/SplitParallelTimeoutNoAggregationStrategyTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/SplitParallelTimeoutNoAggregationStrategyTest.java
new file mode 100644
index 000..6464d4da4bd
--- /dev/null
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/SplitParallelTimeoutNoAggregationStrategyTest.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.processor;
+
+import java.util.concurrent.Phaser;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.jupiter.api.Assumptions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+import org.junit.jupiter.api.parallel.Isolated;
+
+@Isolated
+@Timeout(60)
+public class SplitParallelTimeoutNoAggregationStrategyTest extends 
ContextTestSupport {
+
+private final Phaser phaser = new Phaser(3);
+
+@BeforeEach
+void sendEarly() {
+Assumptions.assumeTrue(context.isStarted(), "The test cannot be run 
because the context is not started");
+template.sendBody("direct:start", "A,B,C");
+}
+
+@Test
+public void testSplitTimeout() throws Exception {
+MockEndpoint mock = getMockEndpoint("mock:result");
+// A will timeout so we only get B and/or C
+mock.message(0).body().not(body().contains("A"));
+
+phaser.awaitAdvanceInterruptibly(0, 5000, TimeUnit.SECONDS);
+
+assertMockEndpointsSatisfied();
+}
+
+@Override
+protected RouteBuilder createRouteBuilder() throws Exception {
+return new RouteBuilder() {
+@Override
+public void configure() throws 

(camel) branch camel-4.4.x updated: CAMEL-20457: camel-core - Fix NPE in split parallel timeout without agg strategy. (#13282)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-4.4.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-4.4.x by this push:
 new 327bc0e048c CAMEL-20457: camel-core - Fix NPE in split parallel 
timeout without agg strategy. (#13282)
327bc0e048c is described below

commit 327bc0e048c7078f8e774af16f7f65b9ec1c7dc5
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 09:44:17 2024 +0100

CAMEL-20457: camel-core - Fix NPE in split parallel timeout without agg 
strategy. (#13282)
---
 .../apache/camel/processor/MulticastProcessor.java |  7 +-
 ...itParallelTimeoutNoAggregationStrategyTest.java | 79 ++
 2 files changed, 84 insertions(+), 2 deletions(-)

diff --git 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
index 0a2333ba89a..89f946fa4e7 100644
--- 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
+++ 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
@@ -469,9 +469,12 @@ public class MulticastProcessor extends 
AsyncProcessorSupport
 Exchange exchange = completion.pollUnordered();
 int index = exchange != null ? 
getExchangeIndex(exchange) : nbExchangeSent.get();
 while (nbAggregated.get() < index) {
+int idx = nbAggregated.getAndIncrement();
 AggregationStrategy strategy = 
getAggregationStrategy(null);
-strategy.timeout(result.get() != null ? 
result.get() : original,
-nbAggregated.getAndIncrement(), 
nbExchangeSent.get(), timeout);
+if (strategy != null) {
+strategy.timeout(result.get() != null ? 
result.get() : original,
+idx, nbExchangeSent.get(), timeout);
+}
 }
 if (exchange != null) {
 doAggregate(result, exchange, original);
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/SplitParallelTimeoutNoAggregationStrategyTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/SplitParallelTimeoutNoAggregationStrategyTest.java
new file mode 100644
index 000..6464d4da4bd
--- /dev/null
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/SplitParallelTimeoutNoAggregationStrategyTest.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.processor;
+
+import java.util.concurrent.Phaser;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.jupiter.api.Assumptions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+import org.junit.jupiter.api.parallel.Isolated;
+
+@Isolated
+@Timeout(60)
+public class SplitParallelTimeoutNoAggregationStrategyTest extends 
ContextTestSupport {
+
+private final Phaser phaser = new Phaser(3);
+
+@BeforeEach
+void sendEarly() {
+Assumptions.assumeTrue(context.isStarted(), "The test cannot be run 
because the context is not started");
+template.sendBody("direct:start", "A,B,C");
+}
+
+@Test
+public void testSplitTimeout() throws Exception {
+MockEndpoint mock = getMockEndpoint("mock:result");
+// A will timeout so we only get B and/or C
+mock.message(0).body().not(body().contains("A"));
+
+phaser.awaitAdvanceInterruptibly(0, 5000, TimeUnit.SECONDS);
+
+assertMockEndpointsSatisfied();
+}
+
+@Override
+protected RouteBuilder createRouteBuilder() throws Exception {
+return new RouteBuilder() {
+@Override
+public void configure() throws 

(camel) branch camel-4.0.x updated: CAMEL-20457: camel-core - Fix NPE in split parallel timeout without agg strategy. (#13282)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-4.0.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-4.0.x by this push:
 new f9edfff3dcc CAMEL-20457: camel-core - Fix NPE in split parallel 
timeout without agg strategy. (#13282)
f9edfff3dcc is described below

commit f9edfff3dcc9297ae092f994ea787be686c16002
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 09:44:17 2024 +0100

CAMEL-20457: camel-core - Fix NPE in split parallel timeout without agg 
strategy. (#13282)
---
 .../apache/camel/processor/MulticastProcessor.java |  7 +-
 ...itParallelTimeoutNoAggregationStrategyTest.java | 79 ++
 2 files changed, 84 insertions(+), 2 deletions(-)

diff --git 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
index 8196139634b..9e5a486ca94 100644
--- 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
+++ 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
@@ -469,9 +469,12 @@ public class MulticastProcessor extends 
AsyncProcessorSupport
 Exchange exchange = completion.pollUnordered();
 int index = exchange != null ? 
getExchangeIndex(exchange) : nbExchangeSent.get();
 while (nbAggregated.get() < index) {
+int idx = nbAggregated.getAndIncrement();
 AggregationStrategy strategy = 
getAggregationStrategy(null);
-strategy.timeout(result.get() != null ? 
result.get() : original,
-nbAggregated.getAndIncrement(), 
nbExchangeSent.get(), timeout);
+if (strategy != null) {
+strategy.timeout(result.get() != null ? 
result.get() : original,
+idx, nbExchangeSent.get(), timeout);
+}
 }
 if (exchange != null) {
 doAggregate(result, exchange, original);
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/SplitParallelTimeoutNoAggregationStrategyTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/SplitParallelTimeoutNoAggregationStrategyTest.java
new file mode 100644
index 000..6464d4da4bd
--- /dev/null
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/SplitParallelTimeoutNoAggregationStrategyTest.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.processor;
+
+import java.util.concurrent.Phaser;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.jupiter.api.Assumptions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+import org.junit.jupiter.api.parallel.Isolated;
+
+@Isolated
+@Timeout(60)
+public class SplitParallelTimeoutNoAggregationStrategyTest extends 
ContextTestSupport {
+
+private final Phaser phaser = new Phaser(3);
+
+@BeforeEach
+void sendEarly() {
+Assumptions.assumeTrue(context.isStarted(), "The test cannot be run 
because the context is not started");
+template.sendBody("direct:start", "A,B,C");
+}
+
+@Test
+public void testSplitTimeout() throws Exception {
+MockEndpoint mock = getMockEndpoint("mock:result");
+// A will timeout so we only get B and/or C
+mock.message(0).body().not(body().contains("A"));
+
+phaser.awaitAdvanceInterruptibly(0, 5000, TimeUnit.SECONDS);
+
+assertMockEndpointsSatisfied();
+}
+
+@Override
+protected RouteBuilder createRouteBuilder() throws Exception {
+return new RouteBuilder() {
+@Override
+public void configure() throws 

(camel) branch main updated: CAMEL-20457: camel-core - Fix NPE in split parallel timeout without agg strategy. (#13282)

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
 new d7d6a6c1f53 CAMEL-20457: camel-core - Fix NPE in split parallel 
timeout without agg strategy. (#13282)
d7d6a6c1f53 is described below

commit d7d6a6c1f53b903efa07c3abc9211fa9aeeba104
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 09:44:17 2024 +0100

CAMEL-20457: camel-core - Fix NPE in split parallel timeout without agg 
strategy. (#13282)
---
 .../apache/camel/processor/MulticastProcessor.java |  7 +-
 ...itParallelTimeoutNoAggregationStrategyTest.java | 79 ++
 2 files changed, 84 insertions(+), 2 deletions(-)

diff --git 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
index 0a2333ba89a..89f946fa4e7 100644
--- 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
+++ 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
@@ -469,9 +469,12 @@ public class MulticastProcessor extends 
AsyncProcessorSupport
 Exchange exchange = completion.pollUnordered();
 int index = exchange != null ? 
getExchangeIndex(exchange) : nbExchangeSent.get();
 while (nbAggregated.get() < index) {
+int idx = nbAggregated.getAndIncrement();
 AggregationStrategy strategy = 
getAggregationStrategy(null);
-strategy.timeout(result.get() != null ? 
result.get() : original,
-nbAggregated.getAndIncrement(), 
nbExchangeSent.get(), timeout);
+if (strategy != null) {
+strategy.timeout(result.get() != null ? 
result.get() : original,
+idx, nbExchangeSent.get(), timeout);
+}
 }
 if (exchange != null) {
 doAggregate(result, exchange, original);
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/SplitParallelTimeoutNoAggregationStrategyTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/SplitParallelTimeoutNoAggregationStrategyTest.java
new file mode 100644
index 000..6464d4da4bd
--- /dev/null
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/SplitParallelTimeoutNoAggregationStrategyTest.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.processor;
+
+import java.util.concurrent.Phaser;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.jupiter.api.Assumptions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+import org.junit.jupiter.api.parallel.Isolated;
+
+@Isolated
+@Timeout(60)
+public class SplitParallelTimeoutNoAggregationStrategyTest extends 
ContextTestSupport {
+
+private final Phaser phaser = new Phaser(3);
+
+@BeforeEach
+void sendEarly() {
+Assumptions.assumeTrue(context.isStarted(), "The test cannot be run 
because the context is not started");
+template.sendBody("direct:start", "A,B,C");
+}
+
+@Test
+public void testSplitTimeout() throws Exception {
+MockEndpoint mock = getMockEndpoint("mock:result");
+// A will timeout so we only get B and/or C
+mock.message(0).body().not(body().contains("A"));
+
+phaser.awaitAdvanceInterruptibly(0, 5000, TimeUnit.SECONDS);
+
+assertMockEndpointsSatisfied();
+}
+
+@Override
+protected RouteBuilder createRouteBuilder() throws Exception {
+return new RouteBuilder() {
+@Override
+public void configure() throws Exception {
+  

Re: [PR] CAMEL-20457: camel-core - Fix NPE in split parallel timeout without a… [camel]

2024-02-24 Thread via GitHub


davsclaus merged PR #13282:
URL: https://github.com/apache/camel/pull/13282


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



[PR] CAMEL-20459: documentation fixes for the aggregate EIP. [camel]

2024-02-24 Thread via GitHub


orpiske opened a new pull request, #13283:
URL: https://github.com/apache/camel/pull/13283

   Signed-off-by: Otavio R. Piske 


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



Re: [PR] CAMEL-20459: documentation fixes for the aggregate EIP. [camel]

2024-02-24 Thread via GitHub


github-actions[bot] commented on PR #13283:
URL: https://github.com/apache/camel/pull/13283#issuecomment-1962298463

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :robot: CI automation will test this PR automatically.
   
   :camel: Apache Camel Committers, please review the following items:
   
   * First-time contributors **require MANUAL approval** for the GitHub Actions 
to run
   
   * You can use the command `/component-test (camel-)component-name1 
(camel-)component-name2..` to request a test from the test bot.
   
   * You can label PRs using `build-all`, `build-dependents`, `skip-tests` and 
`test-dependents` to fine-tune the checks executed by this PR.
   
   * Build and test logs are available in the Summary page. **Only** [Apache 
Camel committers](https://camel.apache.org/community/team/#committers) have 
access to the summary. 
   
   * :warning: Be careful when sharing logs. Review their contents before 
sharing them publicly.


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



(camel) branch regen_bot updated (1059a25e735 -> 44614fbe08a)

2024-02-24 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch regen_bot
in repository https://gitbox.apache.org/repos/asf/camel.git


from 1059a25e735 Regen for commit c15cdbd6f4c2cd9b5658eb78ccb72acb7ec6ac03 
(#13281)
 add 44614fbe08a Regen

No new revisions were added by this update.

Summary of changes:
 .../apache/camel/impl/engine/InternalRouteStartupManager.java| 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)



Re: [PR] CAMEL-20457: camel-core - Fix NPE in split parallel timeout without a… [camel]

2024-02-24 Thread via GitHub


github-actions[bot] commented on PR #13282:
URL: https://github.com/apache/camel/pull/13282#issuecomment-1962291563

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :robot: CI automation will test this PR automatically.
   
   :camel: Apache Camel Committers, please review the following items:
   
   * First-time contributors **require MANUAL approval** for the GitHub Actions 
to run
   
   * You can use the command `/component-test (camel-)component-name1 
(camel-)component-name2..` to request a test from the test bot.
   
   * You can label PRs using `build-all`, `build-dependents`, `skip-tests` and 
`test-dependents` to fine-tune the checks executed by this PR.
   
   * Build and test logs are available in the Summary page. **Only** [Apache 
Camel committers](https://camel.apache.org/community/team/#committers) have 
access to the summary. 
   
   * :warning: Be careful when sharing logs. Review their contents before 
sharing them publicly.


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



[PR] CAMEL-20457: camel-core - Fix NPE in split parallel timeout without a… [camel]

2024-02-24 Thread via GitHub


davsclaus opened a new pull request, #13282:
URL: https://github.com/apache/camel/pull/13282

   …gg strategy.
   
   # Description
   
   
   
   # Target
   
   - [ ] I checked that the commit is targeting the correct branch (note that 
Camel 3 uses `camel-3.x`, whereas Camel 4 uses the `main` branch)
   
   # Tracking
   - [ ] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   
   
   # Apache Camel coding standards and style
   
   - [ ] I checked that each commit in the pull request has a meaningful 
subject line and body.
   
   
   
   - [ ] I have run `mvn clean install -DskipTests` locally and I have 
committed all auto-generated changes
   
   
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

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



(camel) branch main updated: Regen

2024-02-24 Thread davsclaus
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
 new 44614fbe08a Regen
44614fbe08a is described below

commit 44614fbe08a350920b09b62607734a7fb36c4e8e
Author: Claus Ibsen 
AuthorDate: Sat Feb 24 08:59:56 2024 +0100

Regen
---
 .../apache/camel/impl/engine/InternalRouteStartupManager.java| 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteStartupManager.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteStartupManager.java
index d6da72b40a4..496c0f1281a 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteStartupManager.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/InternalRouteStartupManager.java
@@ -77,7 +77,8 @@ final class InternalRouteStartupManager {
 camelContext.setStartingRoutes(true);
 try {
 for (RouteService routeService : routeServices.values()) {
-StartupStep step = 
camelContext.getCamelContextExtension().getStartupStepRecorder().beginStep(Route.class,
 routeService.getId(),
+StartupStep step = 
camelContext.getCamelContextExtension().getStartupStepRecorder().beginStep(Route.class,
+routeService.getId(),
 "Init Route");
 try {
 LOG.debug("Initializing route id: {}", 
routeService.getId());
@@ -298,7 +299,8 @@ final class InternalRouteStartupManager {
 // will then be prepared in time before we start inputs which will
 // consume messages to be routed
 RouteService routeService = entry.getValue().getRouteService();
-StartupStep step = 
camelContext.getCamelContextExtension().getStartupStepRecorder().beginStep(Route.class,
 routeService.getId(),
+StartupStep step = 
camelContext.getCamelContextExtension().getStartupStepRecorder().beginStep(Route.class,
+routeService.getId(),
 "Warump Route");
 try {
 LOG.debug("Warming up route id: {} having autoStartup={}", 
routeService.getId(), autoStartup);
@@ -350,7 +352,8 @@ final class InternalRouteStartupManager {
 continue;
 }
 
-StartupStep step = 
camelContext.getCamelContextExtension().getStartupStepRecorder().beginStep(Route.class,
 route.getRouteId(),
+StartupStep step = 
camelContext.getCamelContextExtension().getStartupStepRecorder().beginStep(Route.class,
+route.getRouteId(),
 "Start Route");
 
 // do some preparation before starting the consumer on the route