JIRA: https://jira.spring.io/browse/INT-3337
INT-3337: Addressing PR comments
INT-3337: Add support to store/read Messages
* Add support to store/read `ErrorMessage`. As a trick for `Throwable` is selected (de)serializing converter
INT-3337: Add converters for `Message<?>` impls
INT-3337: Make `MDbMS.MessageWrapper` AuditAware
Add `_id` persistence field
Addressing PR comments
Polishing
- Docs
- Check for null ApplicationContext
- Add afterPropertiesSet() to tests
JIRA: https://jira.spring.io/browse/INT-3326
INT-3326: Add parent-child test
INT-3326: Fix `ClassCastException` for `GCII`
INT-3326: Rebase and Polishing
INT-3326: Fix `GCII` for `getBeanNamesForType`
INT-3326: Add `GlobalChannelInterceptor` annotation
JIRA: https://jira.spring.io/browse/INT-3326
INT-3326: Add parent-child test
INT-3326: Fix `ClassCastException` for `GCII`
INT-3326: Rebase and Polishing
INT-3326: Fix `GCII` for `getBeanNamesForType`
INT-3326 Polishing Doc, JavaDocs
Also fix a typo in the bean name for the CI processor.
INT-3326: Polishing
Doc Polishing
JIRA: https://jira.spring.io/browse/INT-3346
An `@Id` field is required when MongoDB auditing
is enabled in the ApplicationContext.
This change does not make the document Auditable,
it just prevents an exception being thrown when
auditing is enabled.
JIRA: https://jira.spring.io/browse/INT-3331
INT-3331: PR comments and others
* Register `ChannelSecurityInterceptorBeanPostProcessor` as a `BeanDefinition` (not `BPP`)
* Get `ChannelSecurityInterceptor`s from `ChannelSecurityInterceptorBeanPostProcessor#afterPropertiesSet()`
* Make `ChannelSecurityInterceptor` `final` to disallow to subclass it for unexpected issues
* Provide more convenience to the `ChannelSecurityInterceptorFactoryBean` - to allow to use it from xml configuration
Doc Polishing
JIRA: https://jira.spring.io/browse/INT-3336
Disconnect the client after verifying the broker is available.
Change the rule to a class level rule in DownstreamExceptionTests.
JIRA: https://jira.spring.io/browse/INT-3336
Previously exceptions thrown in a flow downstream of a
message-driven-channel-adapter were not logged and thrown
back to the client, causing the connection to drop and
reconnect.
Add `error-channel` to the adapter to allow normal
error handling. If no error channel, catch and log
the unhandled exception.
Add `adapter.stop();` in the end of 'real' tests to close the mqtt-connection
Implicit channel declaration for items downstream
of a `ChannelInterceptor` were not created.
The `BPP` eagerly fetched the interceptors during its
own creation; this caused the context initialization to fail
because the channel initializer hasn't run yet.
Defer creation of the interceptor beans until they are
actually needed.
Also, when using `@Configuration`, the channelInitializer
is no longer the first bean in the bean factory.
INT-3332 Use SmartLifeCycle to Apply Interceptors
Instead of using a bean post processor, the interceptor
processor now performs the channel interception when beans
in phase Integer.MIN_VALUE are started - after all beans
have been instantiated.
Polishing
JIRA: https://jira.spring.io/browse/INT-3325
JIRA: https://jira.spring.io/browse/INT-1870
Optimized MGS for QueueChannel - uses a LIST for
each channel and LPUSH, RPOP.
* Also fix MutableMessage to be Serializable
INT-1870 Priority Redis Channel Message Store
Supports priorities 0-9 (+ no priority).
Priorities out of that range are treated as no priority.
Polishing - Add Marker Interfaces
* Emit a `WARN` log if a channel is used with a regular MessageGroupStore
* Allow message-store on namespace when defining a priority channel
INT-3325 Polishing; PR Comments
Fix some typos in JavaDocs and Docs
JIRA: https://jira.spring.io/browse/INT-3324
* Move `private` `ExpressionControlBusFactoryBean$ControlBusMethodFilter` class
to the `org.springframework.integration.expression.ControlBusMethodFilter`
to make it as convenient to use from JavaConfig
JIRA: https://jira.spring.io/browse/INT-3321
Refactor `StoredProcExecutorTests` just to use Mockito
INT-3321 Polishing
Mock the operations cache loader; remove static method.
JIRA: https://jira.spring.io/browse/INT-3322
Support the use of an ExpressionEvaluatingSqlParameterSource
from the ExpressionEvaluatingSqlParameterSourceFactory as the
`select-sql-parameter-source` for an inbound channel adapter.
Add documentation showing how to construct the bean.
Add a mechanism to disable caching so that the expression is
re-evaluated each time. However, the value should still be
cached between the `hasValue()` and `getValue()` calls.
INT-3322 Polishing; PR Comments
JIRA: https://jira.spring.io/browse/INT-3323
Poller is internally supported in the bean definition of an http outbound gateway and outbound adapter, but it is not supported by their schema. This change attempts to fix the schema.
* Added in schema element for base poller, in both outbound adapter and outbound gateway
* Added in tests to ensure that a PollingConsumer is the instance type
* Polishing `import` for test classes
JIRA: https://jira.spring.io/browse/INT-3317
In addition add `AbstractCorrelatingMessageHandler.discardChannelName` for convenience with JavaConfig
INT-3317: Add `AbstractCorrMH.outputChannelName`
INT-3317: Fix further `BF` population
Also add `MessageFilter.discardChannelName`
Move `XPathExpressionEvaluatingHeaderValueMessageProcessor` to the `xml.transformer.support` package
Additional polishing
Polishing
PR comments.
JIRA: https://jira.spring.io/browse/INT-3319
The `MessageBuilderFactory` abstraction relies on the bean factory
being propagated to all classes that create messages.
Some classes were missed in the initial PR.
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
JIRA: https://jira.spring.io/browse/INT-3288
Possible crosstalk between in inbound and outbound channel
adapter tests - they used the same queue (foo). The outbound
test leaves a message in the queue.
JIRA: https://jira.spring.io/browse/INT-3316
The `SimpleTypeConverter` delegate uses property editors
which are not thread safe. We protect against concurrent
access when the source is not a String, but when a String,
we delegate to the `STC`.
Synchronize access to the `STC.convertIfNecessary()` method.
JIRA: https://jira.springsource.org/browse/INT-3314
Add to `ServiceActivatingHandler` `beanFactory` population code for the `MessageProcessor` delegate
INT-3314: Populate `BF` to `HValueMProcessor`s
Make `XPathExpressionEvaluatingHeaderValueMessageProcessor` as `public`
INT-3314: Populate `BF` to `HE.messageProcessor`
INT-3314: Add `BF` `NPE` protection
INT-3314 XPath Header Enricher Test
Add a test that verifies the `BeanFactoryTypeConverter` is used
(convert to a TimeZone object).
JIRA: https://jira.spring.io/browse/INT-3288
Sometimes, even locally with no load, ActiveMQ takes over
5 seconds to deliver the message with a polled adapter.
Increase timeout to 20 seconds instead of 2.
JIRA: https://jira.springsource.org/browse/INT-3288
Previously, if you wanted to have a JMS outbound-channel-adapter
participate in an upstream JMS transaction (or use transactions
at all), you had to inject a `JmsTemplate` with `sessionTransacted`
set to `true`.
The `session-transacted` attribute has been added to the adapter,
allowing transactions to be used with the default `JmsTemplate`,
avoiding the need to inject a separate template.
Also, the inbound (polled) channel adapter incorrectly allowed
the `acknowledge` attribute to be set to `transacted` which is invalid and,
again, you had to inject an appropriately configured JmsTemplate
for transactions.
The inbound-channel-adapter now supports `session-transacted` as
well, and `acknowledge` can no longer be set to `transacted`.
There are no changes to the `message-driven-channel-adapter`, you
enable transactions with it by setting `acknowledge="transacted"`
as before.
INT-3288 Doc Polishing; Integration Tests
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-3313
Previously, when `requires-reply="false"` on a `<jms:outbound-gateway/>`
a `null` reply caused a `MessageTimeoutException`, instead of quiet ending of flow.
JIRA: https://jira.springsource.org/browse/INT-3312
* Add `setOutputChannelName` to `AbstractReplyProducingMessageHandler` and `SourcePollingChannelAdapterFactoryBean`
to allow to have 'late binding' and resolve the real channel from `AC` on component initialization, instead of creation phase
* Add `setRequestChannelName` and `setReplyChannelName` to `ContentEnricher` for the same purpose
* Make `HeaderValueMessageProcessor` implementation `public`. It is useful for JavaConfig and DSL
* Polishing parsers to use classes, not their names as strings
INT-3312: PR comments
INT-3312: Polishing
JIRA: https://jira.springsource.org/browse/INT-3298
Emit a WARN log whenever the `ReleaseStrategyFactoryBean`
falls back to using the `SequenceSizeReleaseStrategy`.
This will happen if no method name is provided and no
annotated method is found, or a null reference is provided.
JIRA: https://jira.springsource.org/browse/INT-3305
Previously, if the channel can't be connected (e.g. if the server
does not support SFTP), the connection to the server remained open.
Close the session in the event of a failure.
Add test with the Apache SSHD server.
JIRA: https://jira.springsource.org/browse/INT-3294
Previously, implicit input channel creation was not
supported for annotated endpoints.
Register a `DirectChannel` if the input channel does
not exist in the context.