chibenwa commented on code in PR #3194:
URL: https://github.com/apache/james-project/pull/3194#discussion_r4069204006
##########
server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/metric/ActiveMQMetricCollectorImpl.java:
##########
@@ -42,161 +28,45 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.annotations.VisibleForTesting;
-
-import reactor.core.Disposable;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-import reactor.core.scheduler.Schedulers;
-
+/**
+ * ActiveMQ Statistics Plugin-based metric collector stub.
+ *
+ * The original implementation relied on the ActiveMQ Statistics Plugin
+ * ("ActiveMQ.Statistics.Destination.*" queues) which is specific to legacy
Apache ActiveMQ
+ * and is NOT available in Apache ActiveMQ Artemis.
+ *
+ * This stub implementation delegates to the noop implementation.
+ * To collect Artemis-specific metrics, use the Artemis management API or JMX.
+ */
public class ActiveMQMetricCollectorImpl implements ActiveMQMetricCollector {
private static final Logger LOGGER =
LoggerFactory.getLogger(ActiveMQMetricCollectorImpl.class);
- private final ActiveMQMetricConfiguration config;
- private final ConnectionFactory connectionFactory;
- private final MetricFactory metricFactory;
- private final GaugeRegistry gaugeRegistry;
-
- private final Map<String, ActiveMQMetrics> registeredStatistics = new
HashMap<>();
-
- private Disposable disposable;
-
@Inject
- public ActiveMQMetricCollectorImpl(ActiveMQConfiguration
activeMQConfiguration, ConnectionFactory connectionFactory, MetricFactory
metricFactory, GaugeRegistry gaugeRegistry) {
- this.config = activeMQConfiguration.getMetricConfiguration();
- this.connectionFactory = connectionFactory;
- this.metricFactory = metricFactory;
- this.gaugeRegistry = gaugeRegistry;
+ public ActiveMQMetricCollectorImpl(ActiveMQConfiguration
activeMQConfiguration,
+ jakarta.jms.ConnectionFactory
connectionFactory,
+ MetricFactory metricFactory,
+ GaugeRegistry gaugeRegistry) {
+ LOGGER.info("ActiveMQMetricCollectorImpl: ActiveMQ Statistics Plugin
is not available in Artemis. " +
+ "Metric collection via this class is disabled. Use Artemis JMX or
management API for broker metrics.");
Review Comment:
Yes I think there should be a way to preserve some kind of metrics with
artemis, if we can keep those that would be amazing.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]