@Bean CamelContextConfiguration contextConfiguration() { return new CamelContextConfiguration() { @Override public void beforeApplicationStart(CamelContext context) { LOG.info("Configuring Camel metrics on all routes"); MetricsRoutePolicyFactory fac = new MetricsRoutePolicyFactory(); fac.setMetricsRegistry(metricRegistry); context.addRoutePolicyFactory(fac); } @Override public void afterApplicationStart(CamelContext camelContext) { // noop } }; }
@Bean CamelContextConfiguration contextConfiguration() { logger.info("init camel context"); return camelContext -> { }; }
@Bean public CamelContextConfiguration contextConfiguration() { return (CamelContext camelContext) -> { ((DefaultCamelContext)camelContext).setName("camel-ultrahouse3000"); }; }