Currently the enablement of metrics collection in Spring Integration is tightly coupled to JMX. All logic is done inside IntegrationMBeanExporter. While using JMX may be a logical choice in many situations, users may prefer other ways to digest Spring Integration Metrics, e.g. using Spring Boot Actuators.
While many users may not object to Metrics being always exposed via JMX when using Spring Boot actuators, there might be situations where they may want to disable JMX exposure of metrics, yet still want to collect statistics via other means.
This is currently not possible. As a consequence, we should refactor IntegrationMBeanExporter and refactor out the metrics enablement for Spring Integration.
While doing this, we should also rethink extensibility and possible reuse desires by users. Right now Spring Boot's Spring Integration Actuator:
requires an IntegrationMBeanExporter to be passed in. Ideally something Interface-based would be preferable. Thus, extending IntegrationMBeanExporter is rather problematic as that means I cannot reuse that class with Spring Boot.