You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/01/23 12:25:07 UTC

[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #660: The MicroProfile test fails if message history is turned off

lburgazzoli commented on a change in pull request #660: The MicroProfile test fails if message history is turned off
URL: https://github.com/apache/camel-quarkus/pull/660#discussion_r370087866
 
 

 ##########
 File path: extensions/microprofile-metrics/runtime/src/main/java/org/apache/camel/quarkus/component/microprofile/metrics/runtime/CamelMicroProfileMetricsRecorder.java
 ##########
 @@ -61,4 +63,24 @@ public void configureCamelContext(CamelMicroProfileMetricsConfig config,
             managementStrategy.addEventNotifier(new MicroProfileMetricsCamelContextEventNotifier());
         }
     }
+
+    private static class MicroProfileMetricsContextConfigurerListener extends MainListenerSupport {
+        private static final Logger LOGGER = Logger.getLogger(MicroProfileMetricsContextConfigurerListener.class);
+        private final CamelMicroProfileMetricsConfig config;
+
+        public MicroProfileMetricsContextConfigurerListener(CamelMicroProfileMetricsConfig config) {
+            this.config = config;
+        }
+
+        @Override
+        public void configure(CamelContext camelContext) {
+            if (camelContext.isMessageHistory() && config.enableMessageHistory) {
 
 Review comment:
   It can certainly be done, my only reasoning was: what if the user has explicitly disabled message history ? by adding the extension we would then revert its change without notice.
   
   I guess I can add a log that say that the message history has been turned on in case it was not, maybe the same should happen on 3.1.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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services