Hi,
When starting our application with the axon-micrometer package we get the following warning:
“Cannot provide MessageMonitor for component [queryUpdateEmitter] of type [QueryUpdateEmitter]. Returning No-Op instance.”
The warning is being logged from the GlobalMetricsRegistry in the axonframework.micrometer package.
The QueryUpdateEmitter is auto-configured, so I would expect it to not give warnings by default.
As a quick fix to not have the warning I’ve extended the GlobalMetricRegistry and added an override for the “registerComponent” method see below:
`
public class CustomGlobalMetricRegistry extends GlobalMetricRegistry {
public CustomGlobalMetricRegistry(MeterRegistry meterRegistry) {
super(meterRegistry);
}
@Override
public MessageMonitor<? extends Message<?>> registerComponent(Class<?> componentType, String componentName) {
if (QueryUpdateEmitter.class.isAssignableFrom(componentType)) {
return registerQueryBus(componentName);
}
return super.registerComponent(componentType, componentName);
}
}
`
Is the warning a bug? or are we doing something wrong?
Thanks in advance!