This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
     new 93ed5b048e5a CAMEL-16861: Update docs
93ed5b048e5a is described below

commit 93ed5b048e5ab4b6616a0f8ff634ec07043a5da7
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Feb 23 16:25:28 2026 +0100

    CAMEL-16861: Update docs
---
 .../modules/ROOT/pages/route-group.adoc            | 36 ++++++++--------------
 1 file changed, 12 insertions(+), 24 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/route-group.adoc 
b/docs/user-manual/modules/ROOT/pages/route-group.adoc
index cdcf1d18fd2e..9976f32d3292 100644
--- a/docs/user-manual/modules/ROOT/pages/route-group.adoc
+++ b/docs/user-manual/modules/ROOT/pages/route-group.adoc
@@ -150,49 +150,37 @@ YAML::
 ----
 ====
 
-== Performing Tasks
+== Managing route group in Java
 
-The camel API allows to retrieve all routes of a group and then perform 
various tasks. 
+The Java API allows to retrieve all routes for a group and perform various 
tasks.
 
-Here is an example to suspend all routes of a group:
+Here is an example to suspend all routes:
 
-[source, java]
+[source,java]
 ----
-java
 List<Route> routes = context.getRoutesByGroup("order");
 
 for (Route route : routes) {
-    System.out.println("Suspend routeId=" + route.getId() + " for group=" + 
route.getGroup());
+    System.out.println("Suspending routeId=" + route.getId() + " for group=" + 
route.getGroup());
     route.getRouteController().suspendRoute(route.getId());
 }
 ----
 
-
-== Monitoring
+== Monitoring Route Groups
 
 Camel has optional support for xref:jmx.adoc[JMX management]. This includes 
management of groups.
 
-To get all failed changes for a group:
+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.
+
+For example to get the total number of `Exchange`(s) that has failed within 
this group:
 
-[source, java]
+[source,java]
 ----
 ManagedCamelContext managedContext = 
context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
 ManagedRouteGroupMBean managedRouteGroup = 
managedContext.getManagedRouteGroup("order");
 
-if(managedRouteGroup!=null){
+if (managedRouteGroup != null) {
     System.out.println("Group order has " + 
managedRouteGroup.getExchangesFailed() + " failed exchanges");
 }
 ----
-
-To get all failed changes for every route in a group:
-
-[source, java]
-----
-ManagedCamelContext managedContext = 
context.getCamelContextExtension().getContextPlugin(ManagedCamelContext.class);
-
-List<ManagedRouteMBean> routes = 
managedContext.getManagedRoutesByGroup(flowId);
-
-for (ManagedRouteMBean route : routes) {
-       System.out.println("RouteId=" + route.getRouteId() + " has " + 
route.getExchangesFailed() + " failed exchanges");
-}
-----

Reply via email to