davsclaus commented on code in PR #27996:
URL: https://github.com/apache/camel/pull/27996#discussion_r4301742574
##########
core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java:
##########
@@ -793,6 +801,70 @@ public String dumpRouteSourceLocationsAsXml() throws
Exception {
public void reset() {
super.reset();
load.reset();
+ remoteExchangesTotal.reset();
+ remoteExchangesCompleted.reset();
+ remoteExchangesFailed.reset();
+ remoteExchangesInflight.reset();
Review Comment:
Right, done in 8e9d7975cbe9: `reset()` no longer resets
`remoteExchangesInflight`, as `ManagedPerformanceCounter` leaves
`exchangesInflight`. The context had the same since CAMEL-20879
(`ManagedCamelContext.reset()` reset its `remoteExchangesInflight`), and `camel
cmd reset-stats` resets the context and its routes, so under load both went
below 0; the context keeps it now too.
`testResetKeepsTheRemoteExchangesInflight` holds a remote exchange in a route,
resets the route and the context, and checks inflight stays 1 and goes back to
0 (with the old reset: `hold inflight expected: <1> but was: <0>`).
_Claude Code on behalf of davsclaus_
##########
core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedRouteMBean.java:
##########
@@ -209,4 +209,36 @@ String dumpRouteAsYaml(boolean resolvePlaceholders,
boolean uriAsParameters, boo
@ManagedAttribute(description = "Whether the consumer connects to remote
or local systems")
boolean isRemoteEndpoint();
+ /**
+ * Total number of exchanges the route processed that came from a remote
endpoint.
+ *
+ * @since 4.24
+ */
+ @ManagedAttribute(description = "Total number of exchanges processed from
remote endpoints only")
+ long getRemoteExchangesTotal();
+
+ /**
+ * Completed (success) number of exchanges the route processed that came
from a remote endpoint.
+ *
+ * @since 4.24
+ */
+ @ManagedAttribute(description = "Completed (success) number of exchanges
processed from remote endpoints only")
+ long getRemoteExchangesCompleted();
+
+ /**
+ * Failed number of exchanges the route processed that came from a remote
endpoint.
+ *
+ * @since 4.24
+ */
+ @ManagedAttribute(description = "Failed number of exchanges processed from
remote endpoints only")
+ long getRemoteExchangesFailed();
+
+ /**
+ * Number of exchanges inflight in the route that came from a remote
endpoint.
+ *
+ * @since 4.24
+ */
+ @ManagedAttribute(description = "Total number of exchanges inflight from
remote endpoints only")
Review Comment:
Done in 8e9d7975cbe9: `Number of inflight exchanges from remote endpoints
only`, as `ExchangesInflight` says `Number of inflight exchanges`. The same
wording came from `ManagedCamelContextMBean`, which says it now as well.
_Claude Code on behalf of davsclaus_
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]