You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "tmielke (via GitHub)" <gi...@apache.org> on 2026/10/08 13:19:30 UTC
[PR] CAMEL-24887: Fix route group MBean exchange counters to count once per exchange [camel]
tmielke opened a new pull request, #27576:
URL: https://github.com/apache/camel/pull/27576
# Description
The CAMEL-24590 fix (4.22.1) correctly shared a single `ManagedRouteGroup` instance across all routes in a group, fixing broken `failuresHandled` stats. However, it also broke exchange counting: the group MBean now counts each exchange **once per member route** instead of **once per exchange**. For example, a message traversing 2 routes in a group reports `ExchangesCompleted == 2` instead of `1`.
## Approach
Fix by deduplicating in `ManagedRouteGroup` using the same route stack level approach that `ManagedCamelContext` already uses (CAMEL-18557). A new `UnitOfWork.routeStackLevel(Predicate<Route>)` default method filters the route stack by group name, so an exchange event (process, completed, failed) is only counted when the current route is the **outermost route of its group** on the exchange's route stack.
### Production changes (3 files, ~46 lines)
- **`UnitOfWork.java`** — new `default int routeStackLevel(Predicate<Route>)` method (`@since 4.23`)
- **`DefaultUnitOfWork.java`** — implementation iterating the route stack under the existing lock
- **`ManagedRouteGroup.java`** — override `processExchange`, `completedExchange`, `failedExchange` with the group dedup guard
### Test changes (4 files)
- **`ManagedRouteGroupTest.java`** — restore `ExchangesTotal == 1` for nested group routes
- **`ManagedRouteGroupFailuresHandledTest.java`** — change `ExchangesCompleted` from 3 to 1
- **`ManagedRouteGroupExchangeCountTest.java`** (new) — 6 scenarios: nested routes, routing through non-group route, entry from outside the group, failure path, two groups on one
path, wireTap
- **`DefaultUnitOfWorkRouteStackLevelPredicateTest.java`** (new) — 7 unit tests for the new predicate-based `routeStackLevel` method
### Documentation changes (3 files)
- **`route-group.adoc`** — clarify once-per-group counting in the Monitoring section
- **`camel-4x-upgrade-guide-4_22.adoc`** — 4.22.2 note about the regression fix
- **`camel-4x-upgrade-guide-4_23.adoc`** — upgrade note for users coming from 4.22.1
## Test plan
- [x] `ManagedRouteGroupTest` — existing test with restored assertions
- [x] `ManagedRouteGroupFailuresHandledTest` — existing test with corrected exchange count
- [x] `ManagedRouteGroupExchangeCountTest` — new comprehensive exchange count scenarios
- [x] `DefaultUnitOfWorkRouteStackLevelPredicateTest` — new unit test for filtered route stack level
- [x] All 9 route group management tests pass
- [x] All 7 UoW unit tests pass
- [ ] Backport to `camel-4.22.x` (the API addition is a `default` method, so it's additive)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
# Target
- [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch)
# Tracking
- [x] 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
- [x] I checked that each commit in the pull request has a meaningful subject line and body.
- [x] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes.
# AI-assisted contributions
- [x] If this PR includes AI-generated code, commits have proper co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR description identifies the AI tool used.
--
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24887: Fix route group MBean exchange counters to count once per exchange [camel]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #27576:
URL: https://github.com/apache/camel/pull/27576#discussion_r4221079285
##########
core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGroupExchangeCountTest.java:
##########
@@ -0,0 +1,187 @@
+/*
+ * 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.management;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.api.management.ManagedCamelContext;
+import org.apache.camel.api.management.mbean.ManagedRouteGroupMBean;
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
+
+import static org.awaitility.Awaitility.await;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+/**
+ * Tests that a route group counts each exchange once per entry into the group: calls nested inside another route of the
+ * same group are not counted again (CAMEL-24887).
+ */
+@DisabledOnOs(OS.AIX)
+public class ManagedRouteGroupExchangeCountTest extends ManagementTestSupport {
+
+ @Test
+ public void testGroupCountsExchangeOnce() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message through x1 -> x2 (both in group "g")
+ template.sendBody("direct:x1", "Hello");
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ assertEquals(1, group.getExchangesTotal());
+ assertEquals(0, group.getExchangesInflight());
+
+ // send 2 more messages
+ template.sendBody("direct:x1", "World");
+ template.sendBody("direct:x1", "!");
+
+ assertEquals(3, group.getExchangesCompleted());
+ assertEquals(3, group.getExchangesTotal());
+ }
+
+ @Test
+ public void testGroupCountsOnceWhenRoutingThroughNonGroupRoute() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message through x1 (group "g") -> y (no group) -> x2 (group "g")
+ template.sendBody("direct:x1-via-y", "Hello");
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ assertEquals(1, group.getExchangesTotal());
+ }
+
+ @Test
+ public void testGroupCountsWhenEntryIsOutsideGroup() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message to a route outside the group that calls x2 (in group "g") directly
+ template.sendBody("direct:outside", "Hello");
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ }
+
+ @Test
+ public void testGroupCountsFailure() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message that will fail in x2-fail (group "g")
+ try {
+ template.sendBody("direct:x1-fail", "Hello");
+ } catch (Exception e) {
+ // expected
+ }
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesFailed());
+ assertEquals(0, group.getExchangesCompleted());
+ assertEquals(0, group.getExchangesInflight());
+ }
+
+ @Test
+ public void testTwoGroupsOnOnePath() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message through g1-route (group "g1") -> g2-route (group "g2")
+ template.sendBody("direct:g1-route", "Hello");
+
+ ManagedRouteGroupMBean group1 = mcc.getManagedRouteGroup("g1");
+ ManagedRouteGroupMBean group2 = mcc.getManagedRouteGroup("g2");
+ assertNotNull(group1);
+ assertNotNull(group2);
+ assertEquals(1, group1.getExchangesCompleted());
+ assertEquals(1, group2.getExchangesCompleted());
+ }
+
+ @Test
+ public void testWireTapGroupCounts() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ getMockEndpoint("mock:wt-done").expectedMessageCount(1);
+
+ template.sendBody("direct:wt", "Hello");
+
+ assertMockEndpointsSatisfied();
+
+ // wait for the wireTapped exchange to complete in route "wt-target"
+ await().atMost(5, TimeUnit.SECONDS)
+ .untilAsserted(() -> assertEquals(1L, mcc.getManagedRoute("wt-target").getExchangesCompleted()));
+
+ // each route counts independently at the route level
+ assertEquals(1, mcc.getManagedRoute("wt").getExchangesCompleted());
+ assertEquals(1, mcc.getManagedRoute("wt-target").getExchangesCompleted());
+
+ // the group count is consistent with how the CamelContext MBean counts exchanges
+ long ctxCompleted = mcc.getManagedCamelContext().getExchangesCompleted();
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(ctxCompleted, group.getExchangesCompleted());
+ assertEquals(ctxCompleted, group.getExchangesTotal());
Review Comment:
yeah lets backport to 4.22.x
--
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24887: Fix route group MBean exchange counters to count once per exchange [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27576:
URL: https://github.com/apache/camel/pull/27576#issuecomment-6062542626
: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 although they are normally detected and executed by CI.
* You can label PRs using `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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24887: Fix route group MBean exchange counters to count once per exchange [camel]
Posted by "tmielke (via GitHub)" <gi...@apache.org>.
tmielke commented on PR #27576:
URL: https://github.com/apache/camel/pull/27576#issuecomment-6062529993
Responding to @davsclaus's wireTap comment and @Croway's handled-failure concern:
Thank you both for the thorough reviews. I investigated the wireTap behavior in detail by adding stack trace tracing to DefaultUnitOfWork.pushRoute(), and the results show that the
copy's routeStackLevel is 2, not 1. Here's what actually happens:
Why the wireTap copy has routeStackLevel=2:
1. createCorrelatedCopy(exchange, false) sets copy.setUnitOfWork(null) — correct so far.
2. WireTapTask.run() calls asyncProcessor.process(copy). This asyncProcessor is a CamelInternalProcessor belonging to the source route ("wt"). Its
UnitOfWorkProcessorAdvice.before() creates a new UoW and pushes "wt" onto the stack. Stack level = 1.
3. Inside that CIP's processor chain, a SendProcessor sends the copy to direct:wt-target. The DirectProducer enters another CamelInternalProcessor — this one for route "wt-target".
Its UnitOfWorkProcessorAdvice.before() sees the UoW already exists and pushes "wt-target". Stack level = 2.
4. When completedExchange fires for "wt-target", both the ManagedCamelContext dedup (routeStackLevel <= 1 → false) and the ManagedRouteGroup dedup (routeStackLevel <= 1 → false)
reject the copy.
The key detail is step 2: the WireTap wraps its target processor in a CamelInternalProcessor from the source route (for error handling and UoW management). This pushes the source
route onto the copy's UoW before the copy ever reaches the target route.
Both MCC and MRG are consistent:
I verified this with tracing output:
```
MCC.completedExchange: exchangeId=...0000 routeStackLevel=1 route=wt counting=true
MCC.completedExchange: exchangeId=...0001 routeStackLevel=2 route=wt-target counting=false
MRG.completedExchange: group=g exchangeId=...0000 outermost=true
MRG.completedExchange: group=g exchangeId=...0001 outermost=false
```
Both ManagedCamelContext and ManagedRouteGroup count 1, not 2. The test now asserts this consistency: assertEquals(ctxCompleted, group.getExchangesCompleted()).
Regarding @Croway's handled-failure concern (P2):
I reproduced the scenario with the suggested test patch and extended it to also check ManagedCamelContext.getFailuresHandled(). The result:
```
MCC failuresHandled=0
MRG failuresHandled=0
```
Both MCC and MRG report 0 for the wireTap copy's handled failure. The route-level counter sees failuresHandled=1, but neither the context nor the group counter counts it — because
the copy has routeStackLevel=2 and both use the <= 1 guard. This is a pre-existing limitation of the routeStackLevel dedup approach that ManagedCamelContext has used since
CAMEL-18557, not a regression introduced by this PR. Our fix applies the same pattern to ManagedRouteGroup, inheriting the same limitation.
The comparison to "the PR's parent" passing the test is expected — before this fix, ManagedRouteGroup had no dedup at all and counted every route event unconditionally. That's
exactly the double-counting regression this PR fixes.
Regarding @Croway's doc concern (point 2):
Already addressed — the wording now says "once per entry into the group: calls nested inside another route of the same group are not counted again", with examples covering both
nested and sequential entry.
Summary:
If we want wireTap copies counted as separate exchanges (making the total 2), that would require changing how WireTapProcessor wires its inner CamelInternalProcessor, or changing
the dedup logic in both ManagedCamelContext and ManagedRouteGroup. That's a broader change beyond the scope of CAMEL-24887 and could be tracked as a separate issue.
Claude Code on behalf of Torsten Mielke
--
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24887: Fix route group MBean exchange counters to count once per exchange [camel]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #27576:
URL: https://github.com/apache/camel/pull/27576#issuecomment-6064128670
✅ Backport to `camel-4.22.x` created: https://github.com/apache/camel/pull/27584
--
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24887: Fix route group MBean exchange counters to count once per exchange [camel]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #27576:
URL: https://github.com/apache/camel/pull/27576#discussion_r4219505014
##########
core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGroupExchangeCountTest.java:
##########
@@ -0,0 +1,186 @@
+/*
+ * 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.management;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.api.management.ManagedCamelContext;
+import org.apache.camel.api.management.mbean.ManagedRouteGroupMBean;
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
+
+import static org.awaitility.Awaitility.await;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+/**
+ * Tests that a route group counts each exchange once per group, even when the exchange is routed through multiple
+ * member routes (CAMEL-24887).
+ */
+@DisabledOnOs(OS.AIX)
+public class ManagedRouteGroupExchangeCountTest extends ManagementTestSupport {
+
+ @Test
+ public void testGroupCountsExchangeOnce() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message through x1 -> x2 (both in group "g")
+ template.sendBody("direct:x1", "Hello");
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ assertEquals(1, group.getExchangesTotal());
+ assertEquals(0, group.getExchangesInflight());
+
+ // send 2 more messages
+ template.sendBody("direct:x1", "World");
+ template.sendBody("direct:x1", "!");
+
+ assertEquals(3, group.getExchangesCompleted());
+ assertEquals(3, group.getExchangesTotal());
+ }
+
+ @Test
+ public void testGroupCountsOnceWhenRoutingThroughNonGroupRoute() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message through x1 (group "g") -> y (no group) -> x2 (group "g")
+ template.sendBody("direct:x1-via-y", "Hello");
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ assertEquals(1, group.getExchangesTotal());
+ }
+
+ @Test
+ public void testGroupCountsWhenEntryIsOutsideGroup() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message to a route outside the group that calls x2 (in group "g") directly
+ template.sendBody("direct:outside", "Hello");
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ }
+
+ @Test
+ public void testGroupCountsFailure() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message that will fail in x2-fail (group "g")
+ try {
+ template.sendBody("direct:x1-fail", "Hello");
+ } catch (Exception e) {
+ // expected
+ }
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesFailed());
+ assertEquals(0, group.getExchangesCompleted());
+ assertEquals(0, group.getExchangesInflight());
+ }
+
+ @Test
+ public void testTwoGroupsOnOnePath() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message through g1-route (group "g1") -> g2-route (group "g2")
+ template.sendBody("direct:g1-route", "Hello");
+
+ ManagedRouteGroupMBean group1 = mcc.getManagedRouteGroup("g1");
+ ManagedRouteGroupMBean group2 = mcc.getManagedRouteGroup("g2");
+ assertNotNull(group1);
+ assertNotNull(group2);
+ assertEquals(1, group1.getExchangesCompleted());
+ assertEquals(1, group2.getExchangesCompleted());
+ }
+
+ @Test
+ public void testWireTapGroupCountsOnce() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ getMockEndpoint("mock:wt-done").expectedMessageCount(1);
+
+ template.sendBody("direct:wt", "Hello");
+
+ assertMockEndpointsSatisfied();
+
+ // wait for the wireTapped exchange to complete in route "wt-target"
+ await().atMost(5, TimeUnit.SECONDS)
+ .untilAsserted(() -> assertEquals(1L, mcc.getManagedRoute("wt-target").getExchangesCompleted()));
+
+ // each route counts independently at the route level
+ assertEquals(1, mcc.getManagedRoute("wt").getExchangesCompleted());
+ assertEquals(1, mcc.getManagedRoute("wt-target").getExchangesCompleted());
+
+ // group dedup is consistent with CamelContext dedup: the wireTapped copy is part
+ // of the same exchange flow, so both count it as 1
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ assertEquals(1, group.getExchangesTotal());
Review Comment:
I think this assertion is racy and expects the wrong value:
- `WireTapProcessor.configureCopyExchange` uses `createCorrelatedCopy(exchange, false)`, which clears the copy's UnitOfWork (`ExchangeHelper.createCorrelatedCopy`: "do not share the unit of work").
- When the copy reaches `wt-target`, `UnitOfWorkProcessorAdvice` creates a new UnitOfWork, so the group route stack level there is 1 and the group counts it. The CamelContext MBean counts it too.
- The `await` above waits on the **route** counter. `CompositePerformanceCounter` is built as `(routeMBean, camelContextMBean, mrg)`, so the route counter is updated before the group counter. This assertion can therefore read the group before the tapped exchange's increment lands.
Could you wait on the group counter itself and expect 2 (the tapped copy is a separate exchange)? For example:
```java
await().atMost(5, TimeUnit.SECONDS)
.untilAsserted(() -> assertEquals(2, group.getExchangesCompleted()));
```
The comment about CamelContext dedup should change accordingly.
##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc:
##########
@@ -2365,3 +2365,10 @@ overwritten.
Applications that aggregate classes outside the default whitelist through the replicated repository
without supplying their own `hazelcastInstance` must now provide a `Config` with a
`JavaSerializationFilterConfig` covering their class names.
+
+=== camel-management - Route group exchange counters count once per exchange again
Review Comment:
This is appended at the end of the file, which is inside `== Upgrading Camel 4.21 to 4.22`. Since it is a 4.22.1 → 4.22.2 change, could you move it under `== Upgrading from 4.22.1 to 4.22.2` (near the top of the file)?
##########
core/camel-api/src/main/java/org/apache/camel/spi/UnitOfWork.java:
##########
@@ -247,6 +247,20 @@ public interface UnitOfWork {
*/
int routeStackLevel(boolean includeRouteTemplate, boolean includeKamelet);
+ /**
+ * Gets the number of routes on the route stack that this {@link UnitOfWork} currently is being routed through,
+ * which match the given filter.
+ * <p/>
+ * For example to know whether the current route is the outermost route of a route group on the stack.
+ *
+ * @param filter the filter
+ * @return the number of matching routes on the route stack
+ * @since 4.23
+ */
+ default int routeStackLevel(Predicate<Route> filter) {
Review Comment:
Minor: with a default of `0`, a custom `UnitOfWork` that doesn't override this makes `ManagedRouteGroup` count at every member route again, which is the behaviour this PR fixes. A real value can't be computed from the existing API, so `0` is probably the pragmatic default. A Javadoc note that implementations should override it would make this explicit.
##########
docs/user-manual/modules/ROOT/pages/route-group.adoc:
##########
@@ -177,6 +177,10 @@ Camel has optional support for xref:jmx.adoc[JMX management]. This includes mana
The following code will get the JMX MBean `ManagedRouteGroupMBean` for the route group with name `order`.
Using this MBean you can get metrics, and also operations to start and stop all routes in this group.
+Each exchange is counted once per group, even when it is routed through several member routes of the group,
Review Comment:
This is true only for *nested* calls. If a route outside the group calls two members one after the other, each member is the outermost group route on the stack, so the exchange is counted twice. `ManagedRouteGroupTest` asserts exactly that for group `second` (`assertEquals(2, val)`). Could the wording say something like "counted once per entry into the group; calls nested inside another route of the same group are not counted again"? The same applies to the two upgrade-guide entries.
--
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24887: Fix route group MBean exchange counters to count once per exchange [camel]
Posted by "tmielke (via GitHub)" <gi...@apache.org>.
tmielke commented on code in PR #27576:
URL: https://github.com/apache/camel/pull/27576#discussion_r4220771974
##########
core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGroupExchangeCountTest.java:
##########
@@ -0,0 +1,188 @@
+/*
+ * 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.management;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.api.management.ManagedCamelContext;
+import org.apache.camel.api.management.mbean.ManagedRouteGroupMBean;
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
+
+import static org.awaitility.Awaitility.await;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+/**
+ * Tests that a route group counts each exchange once per entry into the group: calls nested inside another route of the
+ * same group are not counted again (CAMEL-24887).
+ */
+@DisabledOnOs(OS.AIX)
+public class ManagedRouteGroupExchangeCountTest extends ManagementTestSupport {
+
+ @Test
+ public void testGroupCountsExchangeOnce() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message through x1 -> x2 (both in group "g")
+ template.sendBody("direct:x1", "Hello");
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ assertEquals(1, group.getExchangesTotal());
+ assertEquals(0, group.getExchangesInflight());
+
+ // send 2 more messages
+ template.sendBody("direct:x1", "World");
+ template.sendBody("direct:x1", "!");
+
+ assertEquals(3, group.getExchangesCompleted());
+ assertEquals(3, group.getExchangesTotal());
+ }
+
+ @Test
+ public void testGroupCountsOnceWhenRoutingThroughNonGroupRoute() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message through x1 (group "g") -> y (no group) -> x2 (group "g")
+ template.sendBody("direct:x1-via-y", "Hello");
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ assertEquals(1, group.getExchangesTotal());
+ }
+
+ @Test
+ public void testGroupCountsWhenEntryIsOutsideGroup() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message to a route outside the group that calls x2 (in group "g") directly
+ template.sendBody("direct:outside", "Hello");
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ }
+
+ @Test
+ public void testGroupCountsFailure() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message that will fail in x2-fail (group "g")
+ try {
+ template.sendBody("direct:x1-fail", "Hello");
+ } catch (Exception e) {
+ // expected
+ }
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesFailed());
+ assertEquals(0, group.getExchangesCompleted());
+ assertEquals(0, group.getExchangesInflight());
+ }
+
+ @Test
+ public void testTwoGroupsOnOnePath() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message through g1-route (group "g1") -> g2-route (group "g2")
+ template.sendBody("direct:g1-route", "Hello");
+
+ ManagedRouteGroupMBean group1 = mcc.getManagedRouteGroup("g1");
+ ManagedRouteGroupMBean group2 = mcc.getManagedRouteGroup("g2");
+ assertNotNull(group1);
+ assertNotNull(group2);
+ assertEquals(1, group1.getExchangesCompleted());
+ assertEquals(1, group2.getExchangesCompleted());
+ }
+
+ @Test
+ public void testWireTapGroupCounts() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ getMockEndpoint("mock:wt-done").expectedMessageCount(1);
+
+ template.sendBody("direct:wt", "Hello");
+
+ assertMockEndpointsSatisfied();
+
+ // wait for the wireTapped exchange to complete in route "wt-target"
+ await().atMost(5, TimeUnit.SECONDS)
+ .untilAsserted(() -> assertEquals(1L, mcc.getManagedRoute("wt-target").getExchangesCompleted()));
+
+ // each route counts independently at the route level
+ assertEquals(1, mcc.getManagedRoute("wt").getExchangesCompleted());
+ assertEquals(1, mcc.getManagedRoute("wt-target").getExchangesCompleted());
+
+ // the group count is consistent with how the CamelContext MBean counts exchanges
+ long ctxCompleted = mcc.getManagedCamelContext().getExchangesCompleted();
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(ctxCompleted, group.getExchangesCompleted());
+ assertEquals(ctxCompleted, group.getExchangesTotal());
Review Comment:
Thanks for resolving the doc, upgrade-guide, and Javadoc threads.
Regarding the wireTap test — I investigated this in detail by adding stack trace tracing to `DefaultUnitOfWork.pushRoute()`, and the copy's `routeStackLevel` is actually 2, not 1. The
suggested test change would fail (the await times out because the group stays at 1, and MCC also reports 1). Here's what happens:
1. `createCorrelatedCopy(exchange, false)` sets `copy.setUnitOfWork(null) `— the copy starts with no UoW. ✓
2. `WireTapTask.run()` calls `asyncProcessor.process(copy)`. This `asyncProcessor` is a `CamelInternalProcessor` belonging to the source route (`"wt"`). Its `UnitOfWorkProcessorAdvice.before()` creates a fresh UoW and pushes `"wt"` onto the stack → `level = 1`.
3. Inside that CIP's processor chain, a `SendProcessor` sends the copy to `direct:wt-target`. The `DirectProducer` enters a second `CamelInternalProcessor` for route `"wt-target"`. Its
`UnitOfWorkProcessorAdvice.before()`sees the UoW already exists (created in step 2) and pushes "`wt-target"` → `level = 2`.
4. When `completedExchange` fires for `"wt-target",` both `ManagedCamelContext (routeStackLevel(includeRT, includeK)<= 1 → false`) and `ManagedRouteGroup (routeStackLevel(filter) <= 1 → false)` skip the copy.
The key is step 2: the WireTap wraps its child processor in a `CamelInternalProcessor` from the source route (for error handling and UoW lifecycle). This pushes the source route onto
the copy's fresh UoW before the copy ever reaches the target route.
Verified output:
```
MCC.completedExchange: exchangeId=...0000 routeStackLevel=1 route=wt counting=true
MCC.completedExchange: exchangeId=...0001 routeStackLevel=2 route=wt-target counting=false
```
So `ManagedCamelContext.getExchangesCompleted()` returns 1, not 2. The group also returns 1. Both are consistent.
Regarding raciness: `CompositePerformanceCounter.completedExchange()` calls counter1 (route), counter2 (context), counter3 (group) sequentially in the same thread. By the time the
route counter is updated, the context and group counters have already been updated in the same invocation — there is no async gap between them.
If we want wireTap copies counted as separate exchanges (total = 2), the fix would need to change how `WireTapProcessor` wires its inner `CamelInternalProcessor`, or change the dedup
logic in both `ManagedCamelContext` and `ManagedRouteGroup`. That seems like a separate concern from CAMEL-24887.
I'll fix the stray blank line on line 183.
--
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24887: Fix route group MBean exchange counters to count once per exchange [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27576:
URL: https://github.com/apache/camel/pull/27576#issuecomment-6063866986
<!-- ci-tested-modules -->
:test_tube: **CI tested the following changed modules:**
- `core/camel-api`
- `core/camel-base-engine`
- `core/camel-core`
- `core/camel-management`
- `docs`
> :information_source: Dependent modules were not tested because the total number of affected modules exceeded the threshold (50). Use the `test-dependents` label to force testing all dependents.
:repeat: **6 tests passed only after a retry on JDK 25** (6 retried attempts)
<details><summary>Recovered flaky tests on JDK 25 (6)</summary>
| Module | Test | Failed attempts | First failure |
| --- | --- | --- | --- |
| `core/camel-core` | `FileConsumerMoveAndMoveFailureTest.testMoveAndMoveFailed` | 1 | mock://result Body of message: 0. Expected: <Hello World> but was: <> |
| `core/camel-core` | `FileProducerNoForcedWritesTest.testNoForcedWrites` | 1 | expected: <Hello World> but was: <> |
| `core/camel-core` | `ScheduledPollConsumerEdgeCasesTest.testConcurrentUnscheduleTask` | 1 | [java.lang.InterruptedException] ==> expected: <true> but was: <false> |
| `core/camel-core` | `ThreadsRejectedExecutionTest.testThreadsRejectedAbortNoRedelivery` | 1 | Expected 0 messages at mock:error but got 1 ==> expected: <0> but was: <1> |
| `core/camel-core` | `DistributedOptimisticLockFailingTest.testEverySecondOneFails` | 1 | expected: <25> but was: <24> |
| `core/camel-core` | `TotalRequestsThrottlerRateDecreaseTest.testDecreaseWhileExchangesWaitForPermits` | 1 | Condition with Lambda expression in org.apache.camel.processor.throttle.requests.TotalRequestsThrottlerRateDecreaseTest was not fulfilled within 5 seconds. |
> :information_source: These tests did **not** fail the build. Surefire retried them and they passed.
> Retries are enabled project-wide by `surefire.rerunFailingTestsCount` in `parent/pom.xml`.
</details>
---
<details><summary>:microscope: Scalpel shadow comparison — Scalpel: 572 of 702 tested, 27 compile-only — current: 573 all tested</summary>
[Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **572 affected modules** (current approach: 573).
**Skip-tests mode would test 572 modules** (5 direct + 568 downstream), **skip tests for 27** (generated code, meta-modules)
<details><summary>Modules only in current approach (1)</summary>
- `camel-test-infra-core`
</details>
<details><summary>Modules Scalpel would test (572)</summary>
- `archetypes` ← downstream of org.apache.camel:camel-support
- `camel-a2a` ← downstream of org.apache.camel:camel-support
- `camel-activemq` ← downstream of org.apache.camel:camel-core-model
- `camel-activemq6` ← downstream of org.apache.camel:camel-core-model
- `camel-ai-observability` ← downstream of org.apache.camel:camel-support
- `camel-ai-observability-api` ← downstream of org.apache.camel:camel-support
- `camel-ai-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-ai-resource` ← downstream of org.apache.camel:camel-support
- `camel-ai-tool` ← downstream of org.apache.camel:camel-support
- `camel-alibaba-common` ← downstream of org.apache.camel:camel-support
- `camel-alibaba-eventbridge` ← downstream of org.apache.camel:camel-support
- `camel-alibaba-fc` ← downstream of org.apache.camel:camel-support
- `camel-alibaba-kms` ← downstream of org.apache.camel:camel-support
- `camel-alibaba-mns` ← downstream of org.apache.camel:camel-support
- `camel-alibaba-oss` ← downstream of org.apache.camel:camel-support
- `camel-alibaba-ots` ← downstream of org.apache.camel:camel-support
- `camel-alibaba-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-alibaba-sls` ← downstream of org.apache.camel:camel-support
- `camel-alibaba-sms` ← downstream of org.apache.camel:camel-support
- `camel-amqp` ← downstream of org.apache.camel:camel-core-model
- `camel-api` ← core/camel-api/src/main/java/org/apache/camel/spi/UnitOfWork.java
- `camel-api-component-maven-plugin` ← downstream of org.apache.camel:camel-test-junit6
- `camel-arangodb` ← downstream of org.apache.camel:camel-support
- `camel-archetype-api-component` ← downstream of org.apache.camel:camel-support
- `camel-archetype-component` ← downstream of org.apache.camel:camel-support
- `camel-archetype-dataformat` ← downstream of org.apache.camel:camel-support
- `camel-archetype-java` ← downstream of org.apache.camel:camel-support
- `camel-archetype-main` ← downstream of org.apache.camel:camel-support
- `camel-as2` ← downstream of org.apache.camel:camel-support
- `camel-as2-api` ← downstream of org.apache.camel:camel-api
- `camel-as2-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-asn1` ← downstream of org.apache.camel:camel-support
- `camel-asterisk` ← downstream of org.apache.camel:camel-support
- `camel-atmosphere-websocket` ← downstream of org.apache.camel:camel-support
- `camel-atom` ← downstream of org.apache.camel:camel-support
- `camel-attachments` ← downstream of org.apache.camel:camel-support
- `camel-avro` ← downstream of org.apache.camel:camel-support
- `camel-avro-rpc` ← downstream of org.apache.camel:camel-support
- `camel-avro-rpc-jetty` ← downstream of org.apache.camel:camel-api
- `camel-avro-rpc-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-avro-rpc-spi` ← downstream of org.apache.camel:camel-core-model
- `camel-aws-bedrock` ← downstream of org.apache.camel:camel-support
- `camel-aws-cloudtrail` ← downstream of org.apache.camel:camel-support
- `camel-aws-common` ← downstream of org.apache.camel:camel-support
- `camel-aws-config` ← downstream of org.apache.camel:camel-support
- `camel-aws-parameter-store` ← downstream of org.apache.camel:camel-support
- `camel-aws-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-aws-secrets-manager` ← downstream of org.apache.camel:camel-support
- `camel-aws-security-hub` ← downstream of org.apache.camel:camel-support
- `camel-aws2-athena` ← downstream of org.apache.camel:camel-support
- `camel-aws2-comprehend` ← downstream of org.apache.camel:camel-support
- `camel-aws2-cw` ← downstream of org.apache.camel:camel-support
- `camel-aws2-ddb` ← downstream of org.apache.camel:camel-support
- `camel-aws2-ec2` ← downstream of org.apache.camel:camel-support
- `camel-aws2-ecs` ← downstream of org.apache.camel:camel-support
- `camel-aws2-eks` ← downstream of org.apache.camel:camel-support
- `camel-aws2-eventbridge` ← downstream of org.apache.camel:camel-support
- `camel-aws2-iam` ← downstream of org.apache.camel:camel-support
- `camel-aws2-kinesis` ← downstream of org.apache.camel:camel-support
- `camel-aws2-kms` ← downstream of org.apache.camel:camel-support
- `camel-aws2-lambda` ← downstream of org.apache.camel:camel-support
- `camel-aws2-mq` ← downstream of org.apache.camel:camel-support
- `camel-aws2-msk` ← downstream of org.apache.camel:camel-support
- `camel-aws2-polly` ← downstream of org.apache.camel:camel-support
- `camel-aws2-redshift` ← downstream of org.apache.camel:camel-support
- `camel-aws2-rekognition` ← downstream of org.apache.camel:camel-support
- `camel-aws2-s3` ← downstream of org.apache.camel:camel-support
- `camel-aws2-s3-vectors` ← downstream of org.apache.camel:camel-support
- `camel-aws2-ses` ← downstream of org.apache.camel:camel-support
- `camel-aws2-sns` ← downstream of org.apache.camel:camel-support
- `camel-aws2-sqs` ← downstream of org.apache.camel:camel-support
- `camel-aws2-step-functions` ← downstream of org.apache.camel:camel-support
- `camel-aws2-sts` ← downstream of org.apache.camel:camel-support
- `camel-aws2-textract` ← downstream of org.apache.camel:camel-support
- `camel-aws2-timestream` ← downstream of org.apache.camel:camel-support
- `camel-aws2-transcribe` ← downstream of org.apache.camel:camel-support
- `camel-aws2-translate` ← downstream of org.apache.camel:camel-support
- `camel-azure-common` ← downstream of org.apache.camel:camel-core-model
- `camel-azure-cosmosdb` ← downstream of org.apache.camel:camel-support
- `camel-azure-eventgrid` ← downstream of org.apache.camel:camel-support
- `camel-azure-eventhubs` ← downstream of org.apache.camel:camel-support
- `camel-azure-files` ← downstream of org.apache.camel:camel-core-model
- `camel-azure-functions` ← downstream of org.apache.camel:camel-support
- `camel-azure-key-vault` ← downstream of org.apache.camel:camel-support
- `camel-azure-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-azure-schema-registry` ← downstream of org.apache.camel:camel-support
- `camel-azure-servicebus` ← downstream of org.apache.camel:camel-support
- `camel-azure-storage-blob` ← downstream of org.apache.camel:camel-support
- `camel-azure-storage-datalake` ← downstream of org.apache.camel:camel-support
- `camel-azure-storage-queue` ← downstream of org.apache.camel:camel-support
- `camel-barcode` ← downstream of org.apache.camel:camel-support
- `camel-base` ← downstream of org.apache.camel:camel-api
- `camel-base-engine` ← core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultUnitOfWork.java
- `camel-base64` ← downstream of org.apache.camel:camel-support
- `camel-bean` ← downstream of org.apache.camel:camel-support
- `camel-bean-validator` ← downstream of org.apache.camel:camel-support
- `camel-beanio` ← downstream of org.apache.camel:camel-support
- `camel-bindy` ← downstream of org.apache.camel:camel-support
- `camel-bonita` ← downstream of org.apache.camel:camel-support
- `camel-box` ← downstream of org.apache.camel:camel-support
- `camel-box-api` ← downstream of org.apache.camel:camel-api
- `camel-box-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-braintree` ← downstream of org.apache.camel:camel-support
- `camel-browse` ← downstream of org.apache.camel:camel-support
- `camel-caffeine` ← downstream of org.apache.camel:camel-support
- `camel-camunda` ← downstream of org.apache.camel:camel-support
- `camel-cassandraql` ← downstream of org.apache.camel:camel-support
- `camel-catalog-common` ← downstream of org.apache.camel:camel-support
- `camel-cbor` ← downstream of org.apache.camel:camel-support
- `camel-chatscript` ← downstream of org.apache.camel:camel-support
- `camel-chunk` ← downstream of org.apache.camel:camel-support
- `camel-cli-connector` ← downstream of org.apache.camel:camel-management
- `camel-cli-debug` ← downstream of org.apache.camel:camel-cli-connector
- `camel-clickhouse` ← downstream of org.apache.camel:camel-support
- `camel-clickup` ← downstream of org.apache.camel:camel-support
- `camel-cloudevents` ← downstream of org.apache.camel:camel-support
- `camel-cluster` ← downstream of org.apache.camel:camel-api
- `camel-cm-sms` ← downstream of org.apache.camel:camel-support
- `camel-coap` ← downstream of org.apache.camel:camel-support
- `camel-cometd` ← downstream of org.apache.camel:camel-support
- `camel-console` ← downstream of org.apache.camel:camel-management
- `camel-consul` ← downstream of org.apache.camel:camel-support
- `camel-controlbus` ← downstream of org.apache.camel:camel-support
- `camel-core` ← core/camel-core/src/test/java/org/apache/camel/impl/engine/DefaultUnitOfWorkRouteStackLevelPredicateTest.java
- `camel-core-all` ← downstream of org.apache.camel:camel-api
- `camel-core-catalog` ← downstream of org.apache.camel:camel-api
- `camel-core-engine` ← downstream of org.apache.camel:camel-api
- `camel-core-languages` ← downstream of org.apache.camel:camel-api
- `camel-core-model` ← downstream of org.apache.camel:camel-api
- `camel-core-processor` ← downstream of org.apache.camel:camel-api
- `camel-core-reifier` ← downstream of org.apache.camel:camel-api
- `camel-core-xml` ← downstream of org.apache.camel:camel-core-engine
- `camel-couchbase` ← downstream of org.apache.camel:camel-support
- `camel-couchdb` ← downstream of org.apache.camel:camel-support
- `camel-cron` ← downstream of org.apache.camel:camel-support
- `camel-crypto` ← downstream of org.apache.camel:camel-support
- `camel-crypto-pgp` ← downstream of org.apache.camel:camel-support
- `camel-csv` ← downstream of org.apache.camel:camel-support
- `camel-cxf-common` ← downstream of org.apache.camel:camel-support
- `camel-cxf-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-cxf-rest` ← downstream of org.apache.camel:camel-support
- `camel-cxf-soap` ← downstream of org.apache.camel:camel-support
- `camel-cxf-spring-common` ← downstream of org.apache.camel:camel-support
- `camel-cxf-spring-rest` ← downstream of org.apache.camel:camel-core-model
- `camel-cxf-spring-soap` ← downstream of org.apache.camel:camel-core-model
- `camel-cxf-spring-transport` ← downstream of org.apache.camel:camel-core-model
- `camel-cxf-transport` ← downstream of org.apache.camel:camel-support
- `camel-cyberark-vault` ← downstream of org.apache.camel:camel-support
- `camel-dapr` ← downstream of org.apache.camel:camel-support
- `camel-dataformat` ← downstream of org.apache.camel:camel-support
- `camel-dataset` ← downstream of org.apache.camel:camel-core-model
- `camel-datasonnet` ← downstream of org.apache.camel:camel-support
- `camel-dataweave` ← downstream of org.apache.camel:camel-core-model
- `camel-debezium-common` ← downstream of org.apache.camel:camel-support
- `camel-debezium-common-parent` ← downstream of org.apache.camel:camel-support
- `camel-debezium-db2` ← downstream of org.apache.camel:camel-core-model
- `camel-debezium-maven-plugin` ← downstream of org.apache.camel:camel-support
- `camel-debezium-mongodb` ← downstream of org.apache.camel:camel-core-model
- `camel-debezium-mysql` ← downstream of org.apache.camel:camel-core-model
- `camel-debezium-oracle` ← downstream of org.apache.camel:camel-core-model
- `camel-debezium-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-debezium-postgres` ← downstream of org.apache.camel:camel-core-model
- `camel-debezium-sqlserver` ← downstream of org.apache.camel:camel-core-model
- `camel-debug` ← downstream of org.apache.camel:camel-management
- `camel-dfdl` ← downstream of org.apache.camel:camel-support
- `camel-dhis2` ← downstream of org.apache.camel:camel-support
- `camel-dhis2-api` ← downstream of org.apache.camel:camel-support
- `camel-dhis2-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-diagram` ← downstream of org.apache.camel:camel-management
- `camel-direct` ← downstream of org.apache.camel:camel-support
- `camel-disruptor` ← downstream of org.apache.camel:camel-support
- `camel-djl` ← downstream of org.apache.camel:camel-support
- `camel-dns` ← downstream of org.apache.camel:camel-support
- `camel-docker` ← downstream of org.apache.camel:camel-support
- `camel-docling` ← downstream of org.apache.camel:camel-support
- `camel-drill` ← downstream of org.apache.camel:camel-support
- `camel-dropbox` ← downstream of org.apache.camel:camel-support
- `camel-dsl-modeline` ← downstream of org.apache.camel:camel-support
- `camel-dsl-support` ← downstream of org.apache.camel:camel-support
- `camel-duckdb` ← downstream of org.apache.camel:camel-support
- `camel-dynamic-router` ← downstream of org.apache.camel:camel-management
- `camel-ehcache` ← downstream of org.apache.camel:camel-support
- `camel-elasticsearch` ← downstream of org.apache.camel:camel-support
- `camel-elasticsearch-rest-client` ← downstream of org.apache.camel:camel-support
- `camel-event` ← downstream of org.apache.camel:camel-support
- `camel-exec` ← downstream of org.apache.camel:camel-support
- `camel-fastjson` ← downstream of org.apache.camel:camel-support
- `camel-fhir` ← downstream of org.apache.camel:camel-support
- `camel-fhir-api` ← downstream of org.apache.camel:camel-support
- `camel-fhir-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-file` ← downstream of org.apache.camel:camel-support
- `camel-file-watch` ← downstream of org.apache.camel:camel-support
- `camel-flatpack` ← downstream of org.apache.camel:camel-core-model
- `camel-flink` ← downstream of org.apache.camel:camel-support
- `camel-flowable` ← downstream of org.apache.camel:camel-support
- `camel-fop` ← downstream of org.apache.camel:camel-support
- `camel-fory` ← downstream of org.apache.camel:camel-support
- `camel-freemarker` ← downstream of org.apache.camel:camel-management
- `camel-ftp` ← downstream of org.apache.camel:camel-core-model
- `camel-ftp-common` ← downstream of org.apache.camel:camel-core-model
- `camel-geocoder` ← downstream of org.apache.camel:camel-support
- `camel-git` ← downstream of org.apache.camel:camel-support
- `camel-github2` ← downstream of org.apache.camel:camel-support
- `camel-google-bigquery` ← downstream of org.apache.camel:camel-support
- `camel-google-calendar` ← downstream of org.apache.camel:camel-support
- `camel-google-common` ← downstream of org.apache.camel:camel-support
- `camel-google-drive` ← downstream of org.apache.camel:camel-support
- `camel-google-firestore` ← downstream of org.apache.camel:camel-support
- `camel-google-functions` ← downstream of org.apache.camel:camel-support
- `camel-google-mail` ← downstream of org.apache.camel:camel-support
- `camel-google-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-google-pubsub` ← downstream of org.apache.camel:camel-support
- `camel-google-secret-manager` ← downstream of org.apache.camel:camel-support
- `camel-google-sheets` ← downstream of org.apache.camel:camel-support
- `camel-google-speech-to-text` ← downstream of org.apache.camel:camel-support
- `camel-google-storage` ← downstream of org.apache.camel:camel-support
- `camel-google-text-to-speech` ← downstream of org.apache.camel:camel-support
- `camel-google-vertexai` ← downstream of org.apache.camel:camel-support
- `camel-google-vision` ← downstream of org.apache.camel:camel-support
- `camel-graphql` ← downstream of org.apache.camel:camel-support
- `camel-grok` ← downstream of org.apache.camel:camel-support
- `camel-groovy` ← downstream of org.apache.camel:camel-support
- `camel-grpc` ← downstream of org.apache.camel:camel-support
- `camel-gson` ← downstream of org.apache.camel:camel-support
- `camel-hashicorp-vault` ← downstream of org.apache.camel:camel-support
- `camel-hazelcast` ← downstream of org.apache.camel:camel-support
- `camel-health` ← downstream of org.apache.camel:camel-api
- `camel-hivemq` ← downstream of org.apache.camel:camel-support
- `camel-hl7` ← downstream of org.apache.camel:camel-core-model
- `camel-http` ← downstream of org.apache.camel:camel-management
- `camel-http-base` ← downstream of org.apache.camel:camel-support
- `camel-http-common` ← downstream of org.apache.camel:camel-support
- `camel-huawei-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-huaweicloud-common` ← downstream of org.apache.camel:camel-support
- `camel-huaweicloud-dms` ← downstream of org.apache.camel:camel-support
- `camel-huaweicloud-frs` ← downstream of org.apache.camel:camel-support
- `camel-huaweicloud-functiongraph` ← downstream of org.apache.camel:camel-support
- `camel-huaweicloud-iam` ← downstream of org.apache.camel:camel-support
- `camel-huaweicloud-imagerecognition` ← downstream of org.apache.camel:camel-support
- `camel-huaweicloud-obs` ← downstream of org.apache.camel:camel-support
- `camel-huaweicloud-smn` ← downstream of org.apache.camel:camel-support
- `camel-huggingface` ← downstream of org.apache.camel:camel-support
- `camel-ibm-cos` ← downstream of org.apache.camel:camel-support
- `camel-ibm-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-ibm-secrets-manager` ← downstream of org.apache.camel:camel-support
- `camel-ibm-watson-discovery` ← downstream of org.apache.camel:camel-support
- `camel-ibm-watson-language` ← downstream of org.apache.camel:camel-support
- `camel-ibm-watson-speech-to-text` ← downstream of org.apache.camel:camel-support
- `camel-ibm-watson-text-to-speech` ← downstream of org.apache.camel:camel-support
- `camel-ibm-watsonx-ai` ← downstream of org.apache.camel:camel-support
- `camel-ibm-watsonx-data` ← downstream of org.apache.camel:camel-support
- `camel-ical` ← downstream of org.apache.camel:camel-support
- `camel-iggy` ← downstream of org.apache.camel:camel-support
- `camel-ignite` ← downstream of org.apache.camel:camel-support
- `camel-infinispan` ← downstream of org.apache.camel:camel-core-model
- `camel-infinispan-common` ← downstream of org.apache.camel:camel-support
- `camel-infinispan-embedded` ← downstream of org.apache.camel:camel-core-model
- `camel-infinispan-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-influxdb` ← downstream of org.apache.camel:camel-support
- `camel-influxdb2` ← downstream of org.apache.camel:camel-support
- `camel-iso8583` ← downstream of org.apache.camel:camel-support
- `camel-jackson` ← downstream of org.apache.camel:camel-core-model
- `camel-jackson-avro` ← downstream of org.apache.camel:camel-support
- `camel-jackson-protobuf` ← downstream of org.apache.camel:camel-support
- `camel-jackson3` ← downstream of org.apache.camel:camel-core-model
- `camel-jackson3-avro` ← downstream of org.apache.camel:camel-support
- `camel-jackson3-protobuf` ← downstream of org.apache.camel:camel-support
- `camel-jackson3xml` ← downstream of org.apache.camel:camel-support
- `camel-jacksonxml` ← downstream of org.apache.camel:camel-support
- `camel-jactl` ← downstream of org.apache.camel:camel-support
- `camel-jandex` ← downstream of org.apache.camel:camel-support
- `camel-jasypt` ← downstream of org.apache.camel:camel-base
- `camel-java-io` ← downstream of org.apache.camel:camel-xml-io
- `camel-java-joor-dsl` ← downstream of org.apache.camel:camel-core-languages
- `camel-javascript` ← downstream of org.apache.camel:camel-support
- `camel-jaxb` ← downstream of org.apache.camel:camel-core-model
- `camel-jbang-console` ← downstream of org.apache.camel:camel-management
- `camel-jbang-mcp` ← downstream of org.apache.camel:camel-xml-io
- `camel-jbang-plugin-mcp` ← downstream of org.apache.camel:camel-jbang-core
- `camel-jbang-plugin-route-parser` ← downstream of org.apache.camel:camel-jbang-core
- `camel-jbang-plugin-tui` ← downstream of org.apache.camel:camel-test-junit6
- `camel-jbang-plugin-validate` ← downstream of org.apache.camel:camel-test-junit6
- `camel-jcache` ← downstream of org.apache.camel:camel-support
- `camel-jcr` ← downstream of org.apache.camel:camel-support
- `camel-jdbc` ← downstream of org.apache.camel:camel-support
- `camel-jetty` ← downstream of org.apache.camel:camel-management
- `camel-jetty-common` ← downstream of org.apache.camel:camel-core-model
- `camel-jfr` ← downstream of org.apache.camel:camel-support
- `camel-jgroups` ← downstream of org.apache.camel:camel-support
- `camel-jgroups-raft` ← downstream of org.apache.camel:camel-support
- `camel-jira` ← downstream of org.apache.camel:camel-support
- `camel-jms` ← downstream of org.apache.camel:camel-management
- `camel-jmx` ← downstream of org.apache.camel:camel-management
- `camel-jolt` ← downstream of org.apache.camel:camel-support
- `camel-jooq` ← downstream of org.apache.camel:camel-support
- `camel-joor` ← downstream of org.apache.camel:camel-support
- `camel-jpa` ← downstream of org.apache.camel:camel-support
- `camel-jq` ← downstream of org.apache.camel:camel-support
- `camel-jsch` ← downstream of org.apache.camel:camel-core-model
- `camel-jslt` ← downstream of org.apache.camel:camel-support
- `camel-json-validator` ← downstream of org.apache.camel:camel-support
- `camel-jsonapi` ← downstream of org.apache.camel:camel-support
- `camel-jsonata` ← downstream of org.apache.camel:camel-support
- `camel-jsonb` ← downstream of org.apache.camel:camel-support
- `camel-jsonpath` ← downstream of org.apache.camel:camel-support
- `camel-jsoup` ← downstream of org.apache.camel:camel-support
- `camel-jt400` ← downstream of org.apache.camel:camel-support
- `camel-jta` ← downstream of org.apache.camel:camel-support
- `camel-jte` ← downstream of org.apache.camel:camel-support
- `camel-kafka` ← downstream of org.apache.camel:camel-support
- `camel-kafka-common` ← downstream of org.apache.camel:camel-support
- `camel-kafka-share` ← downstream of org.apache.camel:camel-support
- `camel-kamelet` ← downstream of org.apache.camel:camel-management
- `camel-kamelet-main-support` ← downstream of org.apache.camel:camel-main
- `camel-keycloak` ← downstream of org.apache.camel:camel-support
- `camel-knative` ← downstream of org.apache.camel:camel-support
- `camel-knative-api` ← downstream of org.apache.camel:camel-support
- `camel-knative-http` ← downstream of org.apache.camel:camel-core-model
- `camel-knative-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-kserve` ← downstream of org.apache.camel:camel-support
- `camel-kubernetes` ← downstream of org.apache.camel:camel-support
- `camel-kudu` ← downstream of org.apache.camel:camel-support
- `camel-langchain4j-agent` ← downstream of org.apache.camel:camel-support
- `camel-langchain4j-agent-api` ← downstream of org.apache.camel:camel-api
- `camel-langchain4j-chat` ← downstream of org.apache.camel:camel-support
- `camel-langchain4j-core` ← downstream of org.apache.camel:camel-support
- `camel-langchain4j-embeddings` ← downstream of org.apache.camel:camel-support
- `camel-langchain4j-embeddingstore` ← downstream of org.apache.camel:camel-support
- `camel-langchain4j-embeddingstore-api` ← downstream of org.apache.camel:camel-api
- `camel-langchain4j-ingest` ← downstream of org.apache.camel:camel-support
- `camel-langchain4j-tokenizer` ← downstream of org.apache.camel:camel-support
- `camel-langchain4j-web-search` ← downstream of org.apache.camel:camel-support
- `camel-language` ← downstream of org.apache.camel:camel-support
- `camel-launcher-container` ← downstream of org.apache.camel:camel-launcher
- `camel-ldap` ← downstream of org.apache.camel:camel-support
- `camel-ldif` ← downstream of org.apache.camel:camel-support
- `camel-log` ← downstream of org.apache.camel:camel-support
- `camel-lra` ← downstream of org.apache.camel:camel-core-model
- `camel-lucene` ← downstream of org.apache.camel:camel-support
- `camel-lumberjack` ← downstream of org.apache.camel:camel-support
- `camel-lzf` ← downstream of org.apache.camel:camel-support
- `camel-mail` ← downstream of org.apache.camel:camel-support
- `camel-mail-microsoft-oauth` ← downstream of org.apache.camel:camel-core-model
- `camel-main` ← downstream of org.apache.camel:camel-api
- `camel-management` ← core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRouteGroup.java, core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGroupExchangeCountTest.java, core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGroupFailuresHandledTest.java, core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGroupTest.java
- `camel-management-api` ← downstream of org.apache.camel:camel-api
- `camel-mapstruct` ← downstream of org.apache.camel:camel-support
- `camel-master` ← downstream of org.apache.camel:camel-support
- `camel-maven-plugin` ← downstream of org.apache.camel:camel-spring-main
- `camel-mcp-server` ← downstream of org.apache.camel:camel-core-model
- `camel-mcp-server-api` ← downstream of org.apache.camel:camel-support
- `camel-mdc` ← downstream of org.apache.camel:camel-support
- `camel-metrics` ← downstream of org.apache.camel:camel-management
- `camel-micrometer` ← downstream of org.apache.camel:camel-management
- `camel-micrometer-observability` ← downstream of org.apache.camel:camel-core-model
- `camel-micrometer-prometheus` ← downstream of org.apache.camel:camel-core-model
- `camel-microprofile-config` ← downstream of org.apache.camel:camel-support
- `camel-microprofile-fault-tolerance` ← downstream of org.apache.camel:camel-management
- `camel-microprofile-health` ← downstream of org.apache.camel:camel-core-model
- `camel-microprofile-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-milo` ← downstream of org.apache.camel:camel-support
- `camel-milvus` ← downstream of org.apache.camel:camel-support
- `camel-mina` ← downstream of org.apache.camel:camel-support
- `camel-mina-sftp` ← downstream of org.apache.camel:camel-core-model
- `camel-minio` ← downstream of org.apache.camel:camel-support
- `camel-mllp` ← downstream of org.apache.camel:camel-support
- `camel-mock` ← downstream of org.apache.camel:camel-support
- `camel-mongodb` ← downstream of org.apache.camel:camel-support
- `camel-mongodb-gridfs` ← downstream of org.apache.camel:camel-support
- `camel-mustache` ← downstream of org.apache.camel:camel-support
- `camel-mvel` ← downstream of org.apache.camel:camel-support
- `camel-mybatis` ← downstream of org.apache.camel:camel-core-model
- `camel-nats` ← downstream of org.apache.camel:camel-support
- `camel-neo4j` ← downstream of org.apache.camel:camel-support
- `camel-netty` ← downstream of org.apache.camel:camel-management
- `camel-netty-http` ← downstream of org.apache.camel:camel-management
- `camel-oaipmh` ← downstream of org.apache.camel:camel-support
- `camel-oauth` ← downstream of org.apache.camel:camel-support
- `camel-observability-services` ← downstream of org.apache.camel:camel-management
- `camel-observation` ← downstream of org.apache.camel:camel-support
- `camel-ocsf` ← downstream of org.apache.camel:camel-support
- `camel-odata` ← downstream of org.apache.camel:camel-support
- `camel-ognl` ← downstream of org.apache.camel:camel-support
- `camel-olingo2` ← downstream of org.apache.camel:camel-support
- `camel-olingo2-api` ← downstream of org.apache.camel:camel-core-model
- `camel-olingo2-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-olingo4` ← downstream of org.apache.camel:camel-support
- `camel-olingo4-api` ← downstream of org.apache.camel:camel-support
- `camel-olingo4-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-once` ← downstream of org.apache.camel:camel-support
- `camel-opa` ← downstream of org.apache.camel:camel-support
- `camel-openai` ← downstream of org.apache.camel:camel-support
- `camel-openapi-java` ← downstream of org.apache.camel:camel-management
- `camel-openapi-rest-dsl-generator` ← downstream of org.apache.camel:camel-api
- `camel-openapi-validator` ← downstream of org.apache.camel:camel-core-model
- `camel-openfga` ← downstream of org.apache.camel:camel-support
- `camel-opensearch` ← downstream of org.apache.camel:camel-support
- `camel-openstack` ← downstream of org.apache.camel:camel-support
- `camel-opentelemetry` ← downstream of org.apache.camel:camel-support
- `camel-opentelemetry-metrics` ← downstream of org.apache.camel:camel-support
- `camel-opentelemetry2` ← downstream of org.apache.camel:camel-core-model
- `camel-optaplanner` ← downstream of org.apache.camel:camel-support
- `camel-paho` ← downstream of org.apache.camel:camel-support
- `camel-paho-mqtt5` ← downstream of org.apache.camel:camel-support
- `camel-parquet-avro` ← downstream of org.apache.camel:camel-support
- `camel-pdf` ← downstream of org.apache.camel:camel-support
- `camel-pg-replication-slot` ← downstream of org.apache.camel:camel-support
- `camel-pgevent` ← downstream of org.apache.camel:camel-support
- `camel-pgvector` ← downstream of org.apache.camel:camel-support
- `camel-pinecone` ← downstream of org.apache.camel:camel-support
- `camel-platform-http` ← downstream of org.apache.camel:camel-core-model
- `camel-platform-http-jolokia` ← downstream of org.apache.camel:camel-support
- `camel-platform-http-main` ← downstream of org.apache.camel:camel-core-model
- `camel-platform-http-vertx` ← downstream of org.apache.camel:camel-management
- `camel-plc4x` ← downstream of org.apache.camel:camel-support
- `camel-pqc` ← downstream of org.apache.camel:camel-support
- `camel-printer` ← downstream of org.apache.camel:camel-support
- `camel-protobuf` ← downstream of org.apache.camel:camel-support
- `camel-pubnub` ← downstream of org.apache.camel:camel-support
- `camel-pulsar` ← downstream of org.apache.camel:camel-support
- `camel-python` ← downstream of org.apache.camel:camel-support
- `camel-python3` ← downstream of org.apache.camel:camel-support
- `camel-qdrant` ← downstream of org.apache.camel:camel-support
- `camel-quartz` ← downstream of org.apache.camel:camel-management
- `camel-quickfix` ← downstream of org.apache.camel:camel-support
- `camel-quickjs` ← downstream of org.apache.camel:camel-support
- `camel-reactive-streams` ← downstream of org.apache.camel:camel-management
- `camel-reactor` ← downstream of org.apache.camel:camel-support
- `camel-redis` ← downstream of org.apache.camel:camel-support
- `camel-ref` ← downstream of org.apache.camel:camel-support
- `camel-resilience4j` ← downstream of org.apache.camel:camel-management
- `camel-resilience4j-micrometer` ← downstream of org.apache.camel:camel-management
- `camel-resourceresolver-github` ← downstream of org.apache.camel:camel-support
- `camel-rest` ← downstream of org.apache.camel:camel-support
- `camel-rest-openapi` ← downstream of org.apache.camel:camel-support
- `camel-rest-postman` ← downstream of org.apache.camel:camel-support
- `camel-restdsl-openapi-plugin` ← downstream of org.apache.camel:camel-core-engine
- `camel-robotframework` ← downstream of org.apache.camel:camel-support
- `camel-rocketmq` ← downstream of org.apache.camel:camel-support
- `camel-rss` ← downstream of org.apache.camel:camel-support
- `camel-rxjava` ← downstream of org.apache.camel:camel-support
- `camel-saga` ← downstream of org.apache.camel:camel-support
- `camel-salesforce` ← downstream of org.apache.camel:camel-core-model
- `camel-salesforce-codegen` ← downstream of org.apache.camel:camel-core-model
- `camel-salesforce-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-sap-netweaver` ← downstream of org.apache.camel:camel-support
- `camel-saxon` ← downstream of org.apache.camel:camel-core-model
- `camel-scheduler` ← downstream of org.apache.camel:camel-support
- `camel-schematron` ← downstream of org.apache.camel:camel-support
- `camel-seda` ← downstream of org.apache.camel:camel-support
- `camel-semantic` ← downstream of org.apache.camel:camel-support
- `camel-servicenow` ← downstream of org.apache.camel:camel-support
- `camel-servicenow-maven-plugin` ← downstream of org.apache.camel:camel-core-model
- `camel-servicenow-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-servlet` ← downstream of org.apache.camel:camel-management
- `camel-shell` ← downstream of org.apache.camel:camel-support
- `camel-shiro` ← downstream of org.apache.camel:camel-support
- `camel-sjms` ← downstream of org.apache.camel:camel-support
- `camel-sjms2` ← downstream of org.apache.camel:camel-support
- `camel-slack` ← downstream of org.apache.camel:camel-support
- `camel-smb` ← downstream of org.apache.camel:camel-support
- `camel-smooks` ← downstream of org.apache.camel:camel-support
- `camel-smpp` ← downstream of org.apache.camel:camel-support
- `camel-snakeyaml` ← downstream of org.apache.camel:camel-support
- `camel-snmp` ← downstream of org.apache.camel:camel-support
- `camel-soap` ← downstream of org.apache.camel:camel-support
- `camel-solr` ← downstream of org.apache.camel:camel-support
- `camel-spiffe` ← downstream of org.apache.camel:camel-support
- `camel-splunk-hec` ← downstream of org.apache.camel:camel-support
- `camel-spring` ← downstream of org.apache.camel:camel-management-api
- `camel-spring-ai-chat` ← downstream of org.apache.camel:camel-support
- `camel-spring-ai-embeddings` ← downstream of org.apache.camel:camel-support
- `camel-spring-ai-image` ← downstream of org.apache.camel:camel-support
- `camel-spring-ai-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-spring-ai-vector-store` ← downstream of org.apache.camel:camel-support
- `camel-spring-batch` ← downstream of org.apache.camel:camel-support
- `camel-spring-cloud-config` ← downstream of org.apache.camel:camel-support
- `camel-spring-jdbc` ← downstream of org.apache.camel:camel-core-model
- `camel-spring-ldap` ← downstream of org.apache.camel:camel-support
- `camel-spring-main` ← downstream of org.apache.camel:camel-core-model
- `camel-spring-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-spring-rabbitmq` ← downstream of org.apache.camel:camel-support
- `camel-spring-redis` ← downstream of org.apache.camel:camel-support
- `camel-spring-security` ← downstream of org.apache.camel:camel-core-model
- `camel-spring-ws` ← downstream of org.apache.camel:camel-support
- `camel-spring-xml` ← downstream of org.apache.camel:camel-management
- `camel-sql` ← downstream of org.apache.camel:camel-support
- `camel-ssh` ← downstream of org.apache.camel:camel-support
- `camel-state-store` ← downstream of org.apache.camel:camel-support
- `camel-state-store-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-stax` ← downstream of org.apache.camel:camel-support
- `camel-stitch` ← downstream of org.apache.camel:camel-support
- `camel-stream` ← downstream of org.apache.camel:camel-support
- `camel-streamcaching-test` ← downstream of org.apache.camel:camel-test-junit6
- `camel-stringtemplate` ← downstream of org.apache.camel:camel-management
- `camel-stripe` ← downstream of org.apache.camel:camel-support
- `camel-stub` ← downstream of org.apache.camel:camel-core-model
- `camel-support` ← downstream of org.apache.camel:camel-api
- `camel-swift` ← downstream of org.apache.camel:camel-support
- `camel-syslog` ← downstream of org.apache.camel:camel-support
- `camel-tahu` ← downstream of org.apache.camel:camel-api
- `camel-tarfile` ← downstream of org.apache.camel:camel-core-model
- `camel-telegram` ← downstream of org.apache.camel:camel-support
- `camel-telemetry` ← downstream of org.apache.camel:camel-support
- `camel-telemetry-dev` ← downstream of org.apache.camel:camel-core-model
- `camel-tensorflow-serving` ← downstream of org.apache.camel:camel-support
- `camel-test-infra-all` ← downstream of org.apache.camel:camel-test-infra-artemis
- `camel-test-infra-artemis` ← downstream of org.apache.camel:camel-test-junit6
- `camel-test-infra-cli` ← downstream of org.apache.camel:camel-support
- `camel-test-infra-smb` ← downstream of org.apache.camel:camel-test-junit6
- `camel-test-junit5` ← downstream of org.apache.camel:camel-management
- `camel-test-junit6` ← downstream of org.apache.camel:camel-management
- `camel-test-main-junit5` ← downstream of org.apache.camel:camel-management
- `camel-test-main-junit6` ← downstream of org.apache.camel:camel-management
- `camel-test-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-test-spring-junit5` ← downstream of org.apache.camel:camel-management
- `camel-test-spring-junit6` ← downstream of org.apache.camel:camel-management
- `camel-thrift` ← downstream of org.apache.camel:camel-support
- `camel-thymeleaf` ← downstream of org.apache.camel:camel-management
- `camel-tika` ← downstream of org.apache.camel:camel-support
- `camel-timer` ← downstream of org.apache.camel:camel-support
- `camel-tooling-maven` ← downstream of org.apache.camel:camel-support
- `camel-toon` ← downstream of org.apache.camel:camel-support
- `camel-tracing` ← downstream of org.apache.camel:camel-support
- `camel-twilio` ← downstream of org.apache.camel:camel-support
- `camel-twitter` ← downstream of org.apache.camel:camel-support
- `camel-typesafe-ai` ← downstream of org.apache.camel:camel-support
- `camel-ubl` ← downstream of org.apache.camel:camel-support
- `camel-undertow` ← downstream of org.apache.camel:camel-management
- `camel-undertow-spring-security` ← downstream of org.apache.camel:camel-core-model
- `camel-univocity-parsers` ← downstream of org.apache.camel:camel-support
- `camel-validator` ← downstream of org.apache.camel:camel-support
- `camel-velocity` ← downstream of org.apache.camel:camel-management
- `camel-vertx` ← downstream of org.apache.camel:camel-support
- `camel-vertx-common` ← downstream of org.apache.camel:camel-support
- `camel-vertx-http` ← downstream of org.apache.camel:camel-core-model
- `camel-vertx-parent` ← downstream of org.apache.camel:camel-core-model
- `camel-vertx-websocket` ← downstream of org.apache.camel:camel-support
- `camel-wal` ← downstream of org.apache.camel:camel-support
- `camel-wasm` ← downstream of org.apache.camel:camel-support
- `camel-weather` ← downstream of org.apache.camel:camel-support
- `camel-weaviate` ← downstream of org.apache.camel:camel-support
- `camel-web3j` ← downstream of org.apache.camel:camel-support
- `camel-webhook` ← downstream of org.apache.camel:camel-support
- `camel-whatsapp` ← downstream of org.apache.camel:camel-support
- `camel-wolf-defender` ← downstream of org.apache.camel:camel-support
- `camel-wordpress` ← downstream of org.apache.camel:camel-support
- `camel-workday` ← downstream of org.apache.camel:camel-support
- `camel-xchange` ← downstream of org.apache.camel:camel-support
- `camel-xj` ← downstream of org.apache.camel:camel-core-model
- `camel-xml-io` ← downstream of org.apache.camel:camel-api
- `camel-xml-io-dsl` ← downstream of org.apache.camel:camel-xml-io
- `camel-xml-jaxb` ← downstream of org.apache.camel:camel-api
- `camel-xml-jaxb-dsl` ← downstream of org.apache.camel:camel-core-languages
- `camel-xml-jaxb-dsl-test-definition` ← downstream of org.apache.camel:camel-management
- `camel-xml-jaxb-dsl-test-spring` ← downstream of org.apache.camel:camel-management
- `camel-xml-jaxp` ← downstream of org.apache.camel:camel-api
- `camel-xmlsecurity` ← downstream of org.apache.camel:camel-support
- `camel-xmpp` ← downstream of org.apache.camel:camel-support
- `camel-xpath` ← downstream of org.apache.camel:camel-support
- `camel-xslt` ← downstream of org.apache.camel:camel-support
- `camel-xslt-saxon` ← downstream of org.apache.camel:camel-core-model
- `camel-yaml-dsl-common` ← downstream of org.apache.camel:camel-core-engine
- `camel-yaml-dsl-validator` ← downstream of org.apache.camel:camel-xml-io
- `camel-yaml-dsl-validator-maven-plugin` ← downstream of org.apache.camel:camel-yaml-dsl-validator
- `camel-yaml-io` ← downstream of org.apache.camel:camel-api
- `camel-zendesk` ← downstream of org.apache.camel:camel-support
- `camel-zip-deflater` ← downstream of org.apache.camel:camel-support
- `camel-zipfile` ← downstream of org.apache.camel:camel-support
- `camel-zookeeper` ← downstream of org.apache.camel:camel-management
- `camel-zookeeper-master` ← downstream of org.apache.camel:camel-support
- `components` ← downstream of org.apache.camel:camel-core-model
</details>
<details><summary>Modules with tests skipped (27)</summary>
- `apache-camel`
- `camel-allcomponents`
- `camel-catalog`
- `camel-catalog-console`
- `camel-catalog-maven`
- `camel-catalog-suggest`
- `camel-componentdsl`
- `camel-endpointdsl`
- `camel-endpointdsl-support`
- `camel-itest`
- `camel-jbang-core`
- `camel-jbang-it`
- `camel-jbang-main`
- `camel-jbang-plugin-edit`
- `camel-jbang-plugin-generate`
- `camel-jbang-plugin-kubernetes`
- `camel-jbang-plugin-test`
- `camel-kamelet-main`
- `camel-launcher`
- `camel-report-maven-plugin`
- `camel-route-parser`
- `camel-salesforce-maven-plugin`
- `camel-yaml-dsl`
- `camel-yaml-dsl-deserializers`
- `camel-yaml-dsl-maven-plugin`
- `coverage`
- `dummy-component`
</details>
> :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
</details>
:warning: **Some tests are disabled on GitHub Actions** (`@DisabledIfSystemProperty(named = "ci.env.name")`) and require manual verification:
- `core/camel-core`: 4 test(s) disabled on GitHub Actions
<details><summary>Build reactor — dependencies compiled but only changed modules were tested (5 modules, 30.3s total)</summary>
**Total reactor time:** 30.3s
| Module | Duration | Status |
| --- | --- | --- |
| Camel :: Docs | 13.4s | SUCCESS |
| Camel :: API | 11.4s | SUCCESS |
| Camel :: Base Engine | 5.5s | SUCCESS |
| Camel :: Core | n/a | |
| Camel :: Management | n/a | |
**Top 20 slowest modules:**
- `Camel :: Docs` (13.4s)
- `Camel :: API` (11.4s)
- `Camel :: Base Engine` (5.5s)
</details>
---
:gear: [View full build and test results](https://github.com/apache/camel/actions/runs/37799377817)
--
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24887: Fix route group MBean exchange counters to count once per exchange [camel]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #27576:
URL: https://github.com/apache/camel/pull/27576#discussion_r4220562620
##########
core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGroupExchangeCountTest.java:
##########
@@ -0,0 +1,188 @@
+/*
+ * 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.management;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.api.management.ManagedCamelContext;
+import org.apache.camel.api.management.mbean.ManagedRouteGroupMBean;
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
+
+import static org.awaitility.Awaitility.await;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+/**
+ * Tests that a route group counts each exchange once per entry into the group: calls nested inside another route of the
+ * same group are not counted again (CAMEL-24887).
+ */
+@DisabledOnOs(OS.AIX)
+public class ManagedRouteGroupExchangeCountTest extends ManagementTestSupport {
+
+ @Test
+ public void testGroupCountsExchangeOnce() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message through x1 -> x2 (both in group "g")
+ template.sendBody("direct:x1", "Hello");
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ assertEquals(1, group.getExchangesTotal());
+ assertEquals(0, group.getExchangesInflight());
+
+ // send 2 more messages
+ template.sendBody("direct:x1", "World");
+ template.sendBody("direct:x1", "!");
+
+ assertEquals(3, group.getExchangesCompleted());
+ assertEquals(3, group.getExchangesTotal());
+ }
+
+ @Test
+ public void testGroupCountsOnceWhenRoutingThroughNonGroupRoute() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message through x1 (group "g") -> y (no group) -> x2 (group "g")
+ template.sendBody("direct:x1-via-y", "Hello");
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ assertEquals(1, group.getExchangesTotal());
+ }
+
+ @Test
+ public void testGroupCountsWhenEntryIsOutsideGroup() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message to a route outside the group that calls x2 (in group "g") directly
+ template.sendBody("direct:outside", "Hello");
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ }
+
+ @Test
+ public void testGroupCountsFailure() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message that will fail in x2-fail (group "g")
+ try {
+ template.sendBody("direct:x1-fail", "Hello");
+ } catch (Exception e) {
+ // expected
+ }
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesFailed());
+ assertEquals(0, group.getExchangesCompleted());
+ assertEquals(0, group.getExchangesInflight());
+ }
+
+ @Test
+ public void testTwoGroupsOnOnePath() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message through g1-route (group "g1") -> g2-route (group "g2")
+ template.sendBody("direct:g1-route", "Hello");
+
+ ManagedRouteGroupMBean group1 = mcc.getManagedRouteGroup("g1");
+ ManagedRouteGroupMBean group2 = mcc.getManagedRouteGroup("g2");
+ assertNotNull(group1);
+ assertNotNull(group2);
+ assertEquals(1, group1.getExchangesCompleted());
+ assertEquals(1, group2.getExchangesCompleted());
+ }
+
+ @Test
+ public void testWireTapGroupCounts() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ getMockEndpoint("mock:wt-done").expectedMessageCount(1);
+
+ template.sendBody("direct:wt", "Hello");
+
+ assertMockEndpointsSatisfied();
+
+ // wait for the wireTapped exchange to complete in route "wt-target"
+ await().atMost(5, TimeUnit.SECONDS)
+ .untilAsserted(() -> assertEquals(1L, mcc.getManagedRoute("wt-target").getExchangesCompleted()));
+
+ // each route counts independently at the route level
+ assertEquals(1, mcc.getManagedRoute("wt").getExchangesCompleted());
+ assertEquals(1, mcc.getManagedRoute("wt-target").getExchangesCompleted());
+
+ // the group count is consistent with how the CamelContext MBean counts exchanges
+ long ctxCompleted = mcc.getManagedCamelContext().getExchangesCompleted();
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(ctxCompleted, group.getExchangesCompleted());
+ assertEquals(ctxCompleted, group.getExchangesTotal());
Review Comment:
This can still read stale values. After the `await` on the `wt-target` route counter, the CamelContext and group counters may not have been updated yet, because `CompositePerformanceCounter` updates them after the route counter. So the test can see `ctxCompleted == 2` with the group still at 1, and fail randomly. Or it can read both as 1 and pass even though the counts are stale. Comparing against `ctxCompleted` also means the expected value of 2 is never asserted. Could you wait on the group counter itself, and pin the value?
```suggestion
// the wireTapped copy is a separate exchange with its own UnitOfWork, so the group
// (like the CamelContext MBean) counts it as a second exchange. Wait on the group
// counter itself: it is updated after the route and CamelContext counters
ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
assertNotNull(group);
await().atMost(5, TimeUnit.SECONDS)
.untilAsserted(() -> assertEquals(2, group.getExchangesCompleted()));
assertEquals(2, group.getExchangesTotal());
// each route counts independently at the route level
assertEquals(1, mcc.getManagedRoute("wt").getExchangesCompleted());
assertEquals(1, mcc.getManagedRoute("wt-target").getExchangesCompleted());
assertEquals(2, mcc.getManagedCamelContext().getExchangesCompleted());
```
--
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24887: Fix route group MBean exchange counters to count once per exchange [camel]
Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #27576:
URL: https://github.com/apache/camel/pull/27576#discussion_r4220976146
##########
core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGroupExchangeCountTest.java:
##########
@@ -0,0 +1,187 @@
+/*
+ * 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.management;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.api.management.ManagedCamelContext;
+import org.apache.camel.api.management.mbean.ManagedRouteGroupMBean;
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
+
+import static org.awaitility.Awaitility.await;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+/**
+ * Tests that a route group counts each exchange once per entry into the group: calls nested inside another route of the
+ * same group are not counted again (CAMEL-24887).
+ */
+@DisabledOnOs(OS.AIX)
+public class ManagedRouteGroupExchangeCountTest extends ManagementTestSupport {
+
+ @Test
+ public void testGroupCountsExchangeOnce() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message through x1 -> x2 (both in group "g")
+ template.sendBody("direct:x1", "Hello");
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ assertEquals(1, group.getExchangesTotal());
+ assertEquals(0, group.getExchangesInflight());
+
+ // send 2 more messages
+ template.sendBody("direct:x1", "World");
+ template.sendBody("direct:x1", "!");
+
+ assertEquals(3, group.getExchangesCompleted());
+ assertEquals(3, group.getExchangesTotal());
+ }
+
+ @Test
+ public void testGroupCountsOnceWhenRoutingThroughNonGroupRoute() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message through x1 (group "g") -> y (no group) -> x2 (group "g")
+ template.sendBody("direct:x1-via-y", "Hello");
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ assertEquals(1, group.getExchangesTotal());
+ }
+
+ @Test
+ public void testGroupCountsWhenEntryIsOutsideGroup() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message to a route outside the group that calls x2 (in group "g") directly
+ template.sendBody("direct:outside", "Hello");
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesCompleted());
+ }
+
+ @Test
+ public void testGroupCountsFailure() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message that will fail in x2-fail (group "g")
+ try {
+ template.sendBody("direct:x1-fail", "Hello");
+ } catch (Exception e) {
+ // expected
+ }
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(1, group.getExchangesFailed());
+ assertEquals(0, group.getExchangesCompleted());
+ assertEquals(0, group.getExchangesInflight());
+ }
+
+ @Test
+ public void testTwoGroupsOnOnePath() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ // send 1 message through g1-route (group "g1") -> g2-route (group "g2")
+ template.sendBody("direct:g1-route", "Hello");
+
+ ManagedRouteGroupMBean group1 = mcc.getManagedRouteGroup("g1");
+ ManagedRouteGroupMBean group2 = mcc.getManagedRouteGroup("g2");
+ assertNotNull(group1);
+ assertNotNull(group2);
+ assertEquals(1, group1.getExchangesCompleted());
+ assertEquals(1, group2.getExchangesCompleted());
+ }
+
+ @Test
+ public void testWireTapGroupCounts() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+
+ getMockEndpoint("mock:wt-done").expectedMessageCount(1);
+
+ template.sendBody("direct:wt", "Hello");
+
+ assertMockEndpointsSatisfied();
+
+ // wait for the wireTapped exchange to complete in route "wt-target"
+ await().atMost(5, TimeUnit.SECONDS)
+ .untilAsserted(() -> assertEquals(1L, mcc.getManagedRoute("wt-target").getExchangesCompleted()));
+
+ // each route counts independently at the route level
+ assertEquals(1, mcc.getManagedRoute("wt").getExchangesCompleted());
+ assertEquals(1, mcc.getManagedRoute("wt-target").getExchangesCompleted());
+
+ // the group count is consistent with how the CamelContext MBean counts exchanges
+ long ctxCompleted = mcc.getManagedCamelContext().getExchangesCompleted();
+
+ ManagedRouteGroupMBean group = mcc.getManagedRouteGroup("g");
+ assertNotNull(group);
+ assertEquals(ctxCompleted, group.getExchangesCompleted());
+ assertEquals(ctxCompleted, group.getExchangesTotal());
Review Comment:
💡 **Nit:** Both assertions compare against `ctxCompleted` — a variable captured right before. If the group counter and the CamelContext counter were both off by the same amount (e.g. both skipping wireTap exchanges), the test would still pass without catching the discrepancy. Consider adding a literal assertion alongside:
```java
// wireTap sends 1 exchange through 2 routes, CamelContext counts exchanges not routes
assertEquals(1L, ctxCompleted);
assertEquals(ctxCompleted, group.getExchangesCompleted());
assertEquals(ctxCompleted, group.getExchangesTotal());
```
Low severity — the test does cover the deduplication logic; this just adds a cross-check.
--
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24887: Fix route group MBean exchange counters to count once per exchange [camel]
Posted by "Croway (via GitHub)" <gi...@apache.org>.
Croway commented on PR #27576:
URL: https://github.com/apache/camel/pull/27576#issuecomment-6061209267
AI-generated review by Codex on behalf of @Croway, reviewing head `803c2cacf32f4ed1c7e353de065505f1941ab724`.
I found one reproduced statistics regression and one documentation mismatch.
1. **[P2] Preserve handled-failure statistics when suppressing nested exchange counts.** In `ManagedRouteGroup.completedExchange()` (lines 226–228), the guard skips the entire superclass update. That update also records `FailuresHandled` and `LastExchangeFailureHandledTimestamp`.
A route in group `g` that wireTaps another route in `g` can complete successfully while the tapped route throws and handles an exception. The wireTap wrapper places the originating route on the tapped exchange's route stack, so the guard suppresses the target's group update. The target route reports `FailuresHandled == 1`, but the group reports `0`; its handled-failure timestamp is not updated and remains null for a fresh group. The originating exchange never receives the tapped exchange's handled-failure state, so its group update cannot recover this information.
I verified the regression with the test patch below: it passes when `ManagedRouteGroup.java` is replaced by the implementation from this PR's parent, and fails with this PR's implementation with `expected: <1> but was: <0>`. The failure repeated on all three configured test attempts. Exchange-count deduplication should preserve handled-failure counts and timestamps from group members, which CAMEL-24590 deliberately made visible.
2. **Documentation: qualify the once-per-exchange claim.** `route-group.adoc` lines 180–181 and the upgrade notes say exchanges are counted once per group. The guard only suppresses nested same-group routes. For `outside[no group] -> a[g]`, followed by `outside -> b[g]`, the same exchange still contributes two completions to `g`, while the CamelContext contributes one. `ManagedRouteGroupTest` lines 63–64 explicitly expects this. Please describe the outermost-route behavior and sequential-entry limitation, or implement the stronger guarantee if that is intended.
Validation: the unchanged PR's 8 focused management tests passed, and all 7 new predicate-based route-stack tests passed. The additional regression test below fails only on its group handled-failure assertion with the PR implementation.
<details>
<summary>Regression test patch for ManagedRouteGroupExchangeCountTest.java</summary>
Apply this patch to the PR head:
```diff
diff --git a/core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGroupExchangeCountTest.java b/core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGroupExchangeCountTest.java
index 9e8fb0492e95..f91daec622e2 100644
--- a/core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGroupExchangeCountTest.java
+++ b/core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGroupExchangeCountTest.java
@@ -146,6 +146,12 @@ public class ManagedRouteGroupExchangeCountTest extends ManagementTestSupport {
return new RouteBuilder() {
@Override
public void configure() {
+ from("direct:review-wt").routeId("review-wt").routeGroup("review-failure")
+ .wireTap("direct:review-wt-target");
+ from("direct:review-wt-target").routeId("review-wt-target").routeGroup("review-failure")
+ .onException(IllegalStateException.class).handled(true).end()
+ .throwException(new IllegalStateException("Handled tap failure"));
+
// x1 -> x2, both in group "g"
from("direct:x1").routeId("x1").routeGroup("g")
.to("direct:x2");
@@ -183,4 +189,14 @@ public class ManagedRouteGroupExchangeCountTest extends ManagementTestSupport {
};
}
+ @Test
+ public void testReviewWireTapHandledFailureIsAggregated() throws Exception {
+ ManagedCamelContext mcc = context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
+ template.sendBody("direct:review-wt", "Hello");
+ await().atMost(5, TimeUnit.SECONDS)
+ .untilAsserted(() -> assertEquals(1, mcc.getManagedRoute("review-wt-target").getFailuresHandled()));
+ assertEquals(1, mcc.getManagedRouteGroup("review-failure").getFailuresHandled());
+ assertNotNull(mcc.getManagedRouteGroup("review-failure").getLastExchangeFailureHandledTimestamp());
+ }
+
}
```
Run from the repository root:
```sh
mvn -pl core/camel-management -am \
'-Dtest=ManagedRouteGroupExchangeCountTest#testReviewWireTapHandledFailureIsAggregated' \
-Dsurefire.failIfNoSpecifiedTests=false test
```
For the baseline comparison, I kept the same test and restored only `ManagedRouteGroup.java` from the PR parent; that run passed, including the non-null timestamp assertion.
</details>
--
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24887: Fix route group MBean exchange counters to count once per exchange [camel]
Posted by "tmielke (via GitHub)" <gi...@apache.org>.
tmielke commented on code in PR #27576:
URL: https://github.com/apache/camel/pull/27576#discussion_r4220536643
##########
docs/user-manual/modules/ROOT/pages/route-group.adoc:
##########
@@ -177,6 +177,10 @@ Camel has optional support for xref:jmx.adoc[JMX management]. This includes mana
The following code will get the JMX MBean `ManagedRouteGroupMBean` for the route group with name `order`.
Using this MBean you can get metrics, and also operations to start and stop all routes in this group.
+Each exchange is counted once per group, even when it is routed through several member routes of the group,
Review Comment:
Addressed in latest commit.
##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc:
##########
@@ -2365,3 +2365,10 @@ overwritten.
Applications that aggregate classes outside the default whitelist through the replicated repository
without supplying their own `hazelcastInstance` must now provide a `Config` with a
`JavaSerializationFilterConfig` covering their class names.
+
+=== camel-management - Route group exchange counters count once per exchange again
Review Comment:
Addressed in latest commit.
--
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24887: Fix route group MBean exchange counters to count once per exchange [camel]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #27576:
URL: https://github.com/apache/camel/pull/27576#issuecomment-6064078138
<!-- camel-backport-bot -->
### 🔄 Backport Bot
**Conflicts (🤖 agent dispatched to resolve):**
- ⚠️ `camel-4.22.x` — Cherry-pick conflict in: docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc, docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
ℹ️ If you push additional commits after `/port`, use `/port` again to update the port PRs.
--
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24887: Fix route group MBean exchange counters to count once per exchange [camel]
Posted by "Croway (via GitHub)" <gi...@apache.org>.
Croway merged PR #27576:
URL: https://github.com/apache/camel/pull/27576
--
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org