camel-quarkus icon indicating copy to clipboard operation
camel-quarkus copied to clipboard

Micrometer: Router policy should be disabled by default (to be consistent with Camel)

Open JiriOndrusek opened this issue 1 year ago • 4 comments

Bug description

As you can see in Camel documentation, RoutePolicyFactory is not enabled by default. CQ should be consistent with this behavior and change default value for property camel.metrics.enableRoutePolicy to false (code)

JiriOndrusek avatar Jun 29 '23 10:06 JiriOndrusek

The docs state that the default is true:

https://camel.apache.org/components/3.20.x/micrometer-component.html#_sb_option_camel_metrics_enable-route-policy

jamesnetherton avatar Jun 29 '23 10:06 jamesnetherton

Default is true for CSB, unfurtunately for plain Camel default is false. Because users have to set routePolicy, like in the test. (Explanation in the doc is From Java you just add the factory to the CamelContext as shown below: context.addRoutePolicyFactory(new MicrometerRoutePolicyFactory());

Therefore CQ should default to false and ticket should be reported for CSB also.

JiriOndrusek avatar Jun 29 '23 11:06 JiriOndrusek

@JiriOndrusek it can be closed? or is there anything about document we need to do?

zhfeng avatar Aug 16 '23 02:08 zhfeng

@zhfeng thanks for noticing the issue!

TBH I still think that my previous comment is right. Let me explain:

  • Micrometer Router policy in Camel is disabled by default, see documentation, following code has to be used to enable policy: context.addRoutePolicyFactory(new MicrometerRoutePolicyFactory());.
  • Micrometer Router policy in CSB is enabled by default, see documentation
  • Micrometer Router policy in CQ is currently enabled by default, but I think, that it should be disabled (and therefore disabled with plain Camel)

I'll prepare a PR which changes this behavior as I suggested above. Therefore we should keep this issue opened.

JiriOndrusek avatar Aug 30 '23 08:08 JiriOndrusek