INT-3637: JMX Improvements Msg Sources/Handlers
JIRA: https://jira.spring.io/browse/INT-3637 - Message Sources - Message Handlers Polishing; Final Review and PR Comments - avoid second call to System.currentTimeMillis() - fix elapsed time in handler metrics - expose TrackableComponent when available INT-3637: Add @IntergrationManagedResource Prevents beans (channels, etc), which were previously picked up via a proxy, from being exported by a standard context MBeanExporter. I looked at completely eliminating the MBeanExporterHelper, which suppresses o.s.integration beans from being exported by a standard MBeanExporter when there is an IMBE present, but I feel this is too much of a breaking change. There are a number of standard beans (such as WireTap) that are @ManagedResources and these would disappear for users that don't have an IMBE. That said, such beans previously disappear completely when there *is* an IMBE so now they are now annotated with both so that they are exported by at most one of the exporters. Polishing; Use MBE.addExludedBean instead of DFA INT-3639: JMX (AMQP/JMS) Channel Stats JIRA: https://jira.spring.io/browse/INT-3639 Module channels inherit `ChannelSendMetrics`; add `PollableChannelManagement` for polled channels. INT-3638: JMX Initial Stats/Counts Settings JIRA: https://jira.spring.io/browse/INT-3638 Add the ability to specify the initial settings for 'enableStats' and 'enableCounts' for MBeans that support those statistics. Polishing; PR Comments; Add Handler Metrics Test Also found a problem using an inner MessageSource bean in an inbound-channel-adapter - a BeanComponentDefinition was returned instead of a BeanDefinition. Add @DirtiesContext to JMX Tests The new MonitorTests failed with InstanceAlreadyExistsException for the errorChannel. Add @DirtiesContext to all tests using the Spring test runner to avoid caching any contexts after the test class completes. INT-3637: JMX Support Negated Name Match Patterns Note: with negated matches, order matters. Polishing for `MonitorTests` Fix `EnableIntegrationMBeanExport` JavaDocs
This commit is contained in:
committed by
Artem Bilan
parent
b56a56e8e6
commit
09c203dc6d
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors
|
||||
* Copyright 2014-2015 the original author or authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,6 +31,7 @@ import org.springframework.integration.channel.MessagePublishingErrorHandler;
|
||||
import org.springframework.integration.gateway.MessagingGatewaySupport;
|
||||
import org.springframework.integration.redis.event.RedisExceptionEvent;
|
||||
import org.springframework.integration.support.channel.BeanFactoryChannelResolver;
|
||||
import org.springframework.integration.support.management.IntegrationManagedResource;
|
||||
import org.springframework.integration.util.ErrorHandlingTaskExecutor;
|
||||
import org.springframework.jmx.export.annotation.ManagedMetric;
|
||||
import org.springframework.jmx.export.annotation.ManagedOperation;
|
||||
@@ -42,9 +43,11 @@ import org.springframework.util.Assert;
|
||||
/**
|
||||
* @author David Liu
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
* @since 4.1
|
||||
*/
|
||||
@ManagedResource
|
||||
@IntegrationManagedResource
|
||||
public class RedisQueueInboundGateway extends MessagingGatewaySupport implements ApplicationEventPublisherAware {
|
||||
|
||||
private static final String QUEUE_NAME_SUFFIX = ".reply";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013 the original author or authors
|
||||
* Copyright 2013-2015 the original author or authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,6 +31,7 @@ import org.springframework.integration.channel.MessagePublishingErrorHandler;
|
||||
import org.springframework.integration.endpoint.MessageProducerSupport;
|
||||
import org.springframework.integration.redis.event.RedisExceptionEvent;
|
||||
import org.springframework.integration.support.channel.BeanFactoryChannelResolver;
|
||||
import org.springframework.integration.support.management.IntegrationManagedResource;
|
||||
import org.springframework.integration.util.ErrorHandlingTaskExecutor;
|
||||
import org.springframework.jmx.export.annotation.ManagedMetric;
|
||||
import org.springframework.jmx.export.annotation.ManagedOperation;
|
||||
@@ -44,9 +45,11 @@ import org.springframework.util.Assert;
|
||||
* @author Mark Fisher
|
||||
* @author Gunnar Hillert
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
* @since 3.0
|
||||
*/
|
||||
@ManagedResource
|
||||
@IntegrationManagedResource
|
||||
public class RedisQueueMessageDrivenEndpoint extends MessageProducerSupport implements ApplicationEventPublisherAware {
|
||||
|
||||
public static final long DEFAULT_RECEIVE_TIMEOUT = 1000;
|
||||
|
||||
Reference in New Issue
Block a user