camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-9389: camel-metrics - Allow to capture message history easily
Date Sat, 05 Dec 2015 14:55:22 GMT
Repository: camel
Updated Branches:
  refs/heads/master 28831913f -> 93d21ff8f


CAMEL-9389: camel-metrics - Allow to capture message history easily


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/93d21ff8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/93d21ff8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/93d21ff8

Branch: refs/heads/master
Commit: 93d21ff8f8347351c38eac1dc91f1e3f50de3eb3
Parents: 2883191
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Dec 5 15:54:03 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat Dec 5 15:54:03 2015 +0100

----------------------------------------------------------------------
 .../metrics/messagehistory/MetricsMessageHistoryFactory.java  | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/93d21ff8/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/messagehistory/MetricsMessageHistoryFactory.java
----------------------------------------------------------------------
diff --git a/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/messagehistory/MetricsMessageHistoryFactory.java
b/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/messagehistory/MetricsMessageHistoryFactory.java
index 56f9d60..274ab14 100644
--- a/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/messagehistory/MetricsMessageHistoryFactory.java
+++ b/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/messagehistory/MetricsMessageHistoryFactory.java
@@ -157,6 +157,13 @@ public class MetricsMessageHistoryFactory extends ServiceSupport implements
Came
         } catch (Exception e) {
             throw ObjectHelper.wrapRuntimeCamelException(e);
         }
+
+        // use metrics registry from service if not explicit configured
+        if (metricsRegistry == null) {
+            metricsRegistry = messageHistoryService.getMetricsRegistry();
+        }
+
+        ObjectHelper.notNull(metricsRegistry, "metricsRegistry", this);
     }
 
     @Override


Mime
View raw message