JIRA: https://jira.spring.io/browse/INT-3704
Some NoSQLs (e.g. Hazelcast) provide a distributed implementations for the `ConcurrentMap`,
so add `SimpleMetadataStore(ConcurrentMap<String, String> metadata)` to allow ot inject any `ConcurrentMap` implementation.
Demonstrate the support for Hazelcast in the `IdempotentReceiverIntegrationTests`
**Cherry-pick to 4.1.x**
JIRA: https://jira.spring.io/browse/INT-3672
Previously the `IdempotentReceiverInterceptor` has been applied only for the `MessageHandler`s which were registered with `.handler` suffix.
Rework `IdempotentReceiverAutoProxyCreatorInitializer` and `IdempotentReceiverAutoProxyCreator` to get deal with **direct** `MessageHandler`s
which can be resulted from `@Bean` methods.
Use the `MessageHandler` real bean name instead of `endpoint pattern` in that case
**Cherry-pick to 4.1.x**
JIRA: https://jira.spring.io/browse/INT-3664
Since all metrics are already direct for the integration components, we don't do any proxying from `IntegrationMBeanExporter`,
and even any other adjustments during BPP phases. Hence this stuff is already redundant for `IntegrationMBeanExporter`.
In addition this change fix the `early access to the BeanFactory from BPP` issue.
INT-3664: Address PR comments
Doc Polish
INT-3664: Polishing according the SF changes to the `PostProcessorRegistrationDelegate$BeanPostProcessorChecker`
JIRA: https://jira.spring.io/browse/INT-3651
- Add documentation for the new JMX environment
- Add the ability to customize the default metrics implementations
- Fix LifecycleMessageHandlerMetrics to get a custom `MessageHandlerMetrics`
- Add an escape to the bean pattern matcher to handle beans starting with `!`
INT-3651: More Docs/Polishing
* JavaDocs polishing
* Change `jmx.xml` to describe `public void stopActiveComponents(long howLong)` not that removed with `boolean force`
JIRA: https://jira.spring.io/browse/INT-3641
Instead of maintaining a moving average on each event, store the events
for offline analysis.
Retain 5*window samples - this means that the earlies retained sample
contributes just 0.5% to the sum. E.g. with a window of 10, the earliest
sample is 0.9**50 (0.005).
Also, defer the conversion from nanoseconds to milliseconds to the
retrieval side.
Experimentation shows this increases perfomance by approximately 2x.
Sending 1B messages to nullChannel.
With Proxy: 1.2M/sec
Afer proxy removed: 2.4M/sec
With this change: 5.3M/sec
INT-3641: Polishing - PR Comments
JavaDocs polishing
JIRA: https://jira.spring.io/browse/INT-3653
Also switch to using `System.nanoTime()` for deltas.
INT-3653: Polishing; PR Comments
INT-3653: Polishing
* Fix `NullChannel` for the generic type
* Add `Assert.notNull` for metrics setters and for the result of `MetricsFactory`
* Fix compile and JavaDocs warnings
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
JIRA: https://jira.spring.io/browse/INT-3636
- Add `enableStats()` managed operation
- Delegate to a channel metrics object instead of using a proxy
INT-3636: Polishing; PR Comments
Change field name in `MBeanExporterHelper`.
INT-3636: Polishing
JIRA: https://jira.spring.io/browse/INT-3626
Remove Direct Array Usages.
With the increased use of java configuration and DSL, it
is no longer safe to directly use array arguments.
(Except in simple wrapper objects).
Avoid (or mark //NOSONAR) catch Throwable.
Remove unused field.
JIRA: https://jira.spring.io/browse/INT-3632
- Use Map.entrySet()
- Double check locking only works when the field(s) are volatile
- Remove unnecessary instanceof tests
JIRA: https://jira.spring.io/browse/INT-3581
Move schemas to 4.2.
Add `selector-expression` to `<wire-tap/>`.
INT-3781: Fix What's New
Bump Namespace Version to 4.2
JIRA: https://jira.spring.io/browse/INT-3565
Cast to `IntegrationObjectSupport` fails if the handler is
already proxied in `AbstractSimpleMessageHandlerFactoryBean`.
INT-3565 Polishing
- Fix test.
- enhance test to show that directly bound message handler beans are not advised if already proxied.
JIRA: https://jira.spring.io/browse/INT-3551
* Rename `MetadataKeyStrategy` -> `MetadataEntryStrategy`
* Add `valueStrategy` to the `MetadataStoreSelector`
* Add `value-strategy` and `value-expression` to the `<idempotent-receiver>`
INT-3551: Add `@IR` support on service methods
Rework `MetadataKeyStrategy` just to the `MessageProcessor`
Fix Docs
Minor Doc Polishing.
JIRA: https://jira.spring.io/browse/INT-2426
INT-2426: pushed `final` modifier fix for Java 6 compatibility
INT-2426: Rework logic to the `MetadataStore`
INT-2426: `IdempotentReceiver` -> `IdempotentReceiverInterceptor`
* Move `Idempotent Filtering` logic to the `IdempotentReceiverInterceptor`, which should be applied as a regular
AOP `Advice` to the `MessageHandler#handleMessage`
* Provide an xml component `<idempotent-receiver>`
* Introduce `IdempotentReceiverAutoProxyCreator` to get deal with `IdempotentReceiverInterceptor` and `MessageHandler`s.
The `Proxying` logic is based on the mapping between interceptor and `consumer endpoint` `ids`
* Introduce `MetadataStoreSelector` along side with `MetadataKeyStrategy` and `ExpressionMetadataKeyStrategy` implementation
INT-2426: Introduce `IdempotentReceiver` annotation
Add `IdempotentReceiverIntegrationTests` in the JMX module to be sure that all proxying works well.
INT-2426: Polishing according PR comments
* Rename `IdempotentReceiverAutoProxyCreatorInitializer`
* Add support for several `IRI` for the one `MH`
* Polishing JavaDocs
INT-2426: Add `What's New` note
Doc Polishing.
More Doc Polishing
Use Timestamp (hex) instead of Id for Value
Facilitate cleanup.
JIRA: https://jira.spring.io/browse/INT-275
In addition fix the `Lifecycle` issue in the `ServiceActivatorAnnotationPostProcessor`
Add Namespace support, Addition tests
and fix some typos in the XSD
INT-275: Fix failed tests
INT-275: Fix for `replyChannel` Header
Add `sync` reply test-case
INT-275: Make `ScatterGatherHandler` sync
Fix some `MessageHandler`s from `SmartLifecycle`
INT-275: Fix `ScatterGatherHandler.handleRequestMessage` logic
INT-275: Fix `ScatterGatherHandler` JMX proxying issues
* Make `AbstractCorrelatingMessageHandler.getMessageStore()` as `public`
* Move `ScatterGatherHandlerIntegrationTests` to the JMX module to be sure that `ScatterGatherHandler`
works well with `@EnableIntegrationMBeanExport`
* Add xml config sample how to use an internal gatherer's `MessageStore` in the `MessageGroupStoreReaper`
* Add `What's New` notice
JIRA: https://jira.spring.io/browse/INT-3455
Do not stop schedulers and executors - allows mid-flow
QueueChannels to be drained.
Stop all inbound MessageProducers (that are not OrderlyShutdownCapable).
INT-3455 Polishing; PR Comments
Change deprecate method usage to the new version
JIRA: https://jira.spring.io/browse/INT-3458
* Change Spring AMQP to `1.3.5.RELEASE`
* `HttpRequestHandlingEndpointSupport`: remove `MappingJacksonHttpMessageConverter` registration
* `IntegrationRequestMappingHandlerMapping`: add 'fake' `name()` attribute to the inline `RequestMapping` annotation
* `StoredProcJmxManagedBeanTests`: remove `context.stop();` code, Since `MBeanExporter` deregister MBeans on `stop()` now
* `StoredProcPollingChannelAdapterParserTests`: change deprecated `ParameterizedSingleColumnRowMapper` to the `SingleColumnRowMapper`
* `Jms`: comment out the reflection code to check the value for the `recoveryInterval`, because it is removed already in favor of `backOff`
* `NotificationListeningMessageProducer`: move the start-up listener registration to the `onApplicationEvent`,
because `MBeanExporter` moved `registerBeans()` to the `start()` now.
The same `phase` might cause the issue, that MBeans aren't registered yet for `NotificationListeningMessageProducer`
* `JpaOutboundGatewayTests`: change `@TransactionConfiguration` to the `@Transactional`. Don't know why the first doesn't work now.
**Cherry-pick to 4.0.x**
INT-3458: Addressing PR comments
`NotificationListeningMessageProducer`: defer listener registration until `onApplicationEvent()`
JIRA: https://jira.spring.io/browse/INT-2352
Add `replaceChannelMappings()` to the `AMMR`.
INT-2352 Polishing - PR Comments
Consolidate tests.
Fix up `@ManagedAttribute` Vs `@ManagedOperation`
Expose `setChannelMappings` over JMX
JIRA: https://jira.spring.io/browse/INT-2738
Add a `getComponentType()` method for all handlers,
message producers, and message sources that implement
`NamedComponent` (see `SPCA.getComponentType()`).
Add rome as an optional dependency - STS complained
because AtomFeedHttpMessageConverter has a dependency
on it.
JIRA: https://jira.spring.io/browse/INT-3349
Several FactoryBeans did not propagate the BeanFactory
to their created object(s). Beans that create messages
must have access to a bean factory to get the
message builder factory.
Fix the FactoryBeans and add a mock FB to all tests that
need one.
Add a runtime environment variable to make any infractions
fatal. This should be set to `true` on CI builds and on
framework developer environments.
JIRA: https://jira.spring.io/browse/INT-3041
Add namespace support to simplify configuration of
a `RequestHandlerRetryAdvice.
INT-3041 Polishing; PR Comments
* Allow a retry-advice element within the request-handler-advice-chain
* Clean up schema (should not have allowed `synchronization-factory` on
the request-handler-advice-chain.
INT-3041 Polishing; PR Comment
This is still a work in process.
There are a bunch of TODOs in classes
that are not managed by Spring and so
need to have the MessageBuilderFactory
injected.
But I am looking for feedback on the
approach.
INT-3309 Resolve TODOs
Provide access to the MessageBuilderFactory in all classes.
INT-3309 Polishing + Tests
* Fallback to 'fromMessage()' if mutating and inbound message is not MutableMessage
* Add 'alwaysMutate' boolean to MutableMessageBuilderFactory - coerces 'fromMessage' calls to 'mutateMessage'
* Add tests
INT-3309 Polishing; PR Comments
Also add tests to parent/child contexts where the parent has the
default message builder and the child has a mutable message builder.
INT-3309 More Polish; PR Comments
Also fix removeHeader in MMB.
JIRA: https://jira.springsource.org/browse/INT-3308
INT-3308 Move Optimization to AbstractDispatcher
- avoids the need for `canShortCutDispatcher()`
- optimizes all framework channels, including AMQP, JMS
- slight additional performance improvement
INT-3308 FinalSingleHandlerChannel
This is still a work in process.
TODO:Parser, parser tests.
See the DirectChannelTests for perforance results.
INT-3308 'Final' Channel Parser Changes, Tests
INT-3308 Polishing; PR Comments
INT-3308 Polishing
* Rename 'final' attribute to 'fixed-subscriber'
* Rename `BasicSingleFixedSubscriberChannel` to `FixedSubscriberChannel`
INT-3308 Polishing
* Rename test cases to match channel
* Fix parser error messages
* Add more exclusive attribute/element tests
INT-3308 More Polishing
* Remove remaining textual references to 'final'
* WARN log if the single subscriber has auto-startup="false"
* Handle the case when a fixed subscriber channel is declared after its handler
* Support the use of a fixed subscriber channel for elements created by an AbstractOutboundChannelAdapterParser
JIRA: https://jira.springsource.org/browse/INT-3295
Instead of invoking the conversion service directly, do it
via a MessageConverter (DefaultDatatypeChannelMessageConverter).
That way, users can override the MessageConverter; for example,
XD wants to look at the content-type header during the conversion
process (and update the content-type).
INT-3295 Polishing
PR Comments.
JIRA: https://jira.springsource.org/browse/INT-3286
Introduce `@EnableMessageHistory` and `MessageHistoryRegistrar`.
Refactoring for `MessageHistoryParser` to use `MessageHistoryRegistrar` to follow with DRY
Add test for `@EnableMessageHistory`
INT-3286: Polishing
INT-3286: Enable several MHs with the same value
Previously the Framework allowed only one `<message-history>`
independent of their `tracked-components`.
With introduction of `@EnableMessageHistory` and `MessageHistoryRegistrar`
the `MessageHistoryConfigurer` is improved to allow
several `<message-history>` or `@EnableMessageHistory`
with the same set of `componentNamePatterns`.
INT-3286 Polishing + JMX + Docs
* Allows setComponentNamePatterns and/or setComponentNamePatternsSet to
be used as long as the settings are consistent.
* Handle the case where the `MHC` was configured as a bean (no managed set exists)
* Add support for changing the component name patterns over JMX + test case
* Docs
INT-3286 More Polishing
* Change bean name to `messageHistoryConfigurer`
* Move constant to `ICU`
* Export the MBean by the `IMBE`
JIRA: https://jira.springsource.org/browse/INT-3284
* Introduce `IntegrationConfigurationBeanFactoryPostProcessor`, `IntegrationConfigurationInitializer`
* Apply `IntegrationConfigurationInitializer` and 'spring.factories' for HTTP and Security modules
INT-3284: Address PR's comments
JIRA: https://jira.springsource.org/browse/INT-3287
* Fix package tangle (INT-3287)
* Apply `IntegrationConfigurationInitializer` for `MBeanExporterHelper`
* Previously, there was a separate `ChannelSecurityInterceptorBeanPostProcessor`
for each `ChannelSecurityInterceptor` whereas now, there is one `ChannelSecurityInterceptorBeanPostProcessor`
that processes all interceptors
INT-3284 Refactoring around config package tangle
Since 3.2.3, the operation invoking message handler can take a
map containing arguments named for their equivalent parameters.
This test was commented out because the 3.x stream supports
older versions of Spring.
JIRA: https://jira.springsource.org/browse/INT-3187
Links to classes moved to `spring-messaging`.
Also `MessageHeaders` was inadvertently added back in by the
last merge.
JIRA: https://jira.springsource.org/browse/INT-3189
__NOTE: Merge to 4.0.0-WIP, not master__