JIRA: https://jira.spring.io/browse/INT-3745
Emit events whenever a message is received that can't be correlated to
a connection (or request in the case of an outbound gateway).
Also, when sending messages, wrap the exception in a `MessagingException` so that
the `TcpConnectionExceptionEvent` provides access to the failed message.
INT-3745: Polishing - PR Comments
Fix JavaDocs errors
JIRA: https://jira.spring.io/browse/INT-3737
Support returning an `InputStream` from a GET operation.
This can be used in conjuction with a `<file:splitter/>` to stream a text file.
The user is responsible for releasing the session when the download is complete.
The session object is stored in the message header and `RemoteFileUtils.closeSession()` should be called
to clean up and close the session.
INT-3737: Polishing and Docs
Fix `CachedSession.close()` bug
Preventing `Caused by: java.io.IOException: Previous raw read was not finalized`
when `Session` is returned to the pool, but `readingRaw` hasn't been finalized
because the real `close()` isn't invoked in case of normal return to pool.
JIRA: https://jira.spring.io/browse/INT-3740
For `File` and `String` payloads add `FileHeaders.ORIGINAL_FILE` and `FileHeaders.FILENAME` headers.
Reworked to create headers once only.
Fix typos and Java > 6 API usage
JIRA: https://jira.spring.io/browse/INT-3739
Since iterating splitters don't have a sequence size, it would be useful to
include a line count in the EOF marker, to facilitate some downstream process
knowing that all lines have been processed, in a multi-threaded situation.
JIRA: https://jira.spring.io/browse/INT-3727
Add a configuration option such that the `FileSplitter` can emit
Start/End messages when splitting.
Polishing according PR comments
Add toString to FileMarker
JIRA: https://jira.spring.io/browse/INT-3718
* If not set to `false` explicitly, add `IgnoreHiddenFileListFilter` as a default in `FileListFilterFactoryBean`
* Update XML Schema XSD and add `ignore-hidden` attribute
* Update + Add tests
* Add documentation
* Add default `IgnoreHiddenFileListFilter` also to `DefaultDirectoryScanner`
JIRA: https://jira.spring.io/browse/INT-3706
Previously, the `mode` attribute on the (S)FTP outbound gateways was ignored.
Take account of the mode on (M)GET and (M)PUT commands.
JIRA: https://jira.spring.io/browse/INT-3661
Previously there were a lot of noise from the `PostProcessorRegistrationDelegate$BeanPostProcessorChecker` for early access for beans.
That may produce some side-effects when some of `BeanFactoryPostProcessor`s won't adjust those beans.
The issue is based on two facts:
1. Loading beans from `BPP`, e.g. `IntegrationEvaluationContextAwareBeanPostProcessor` (or `ChannelSecurityInterceptorBeanPostProcessor` - https://jira.spring.io/browse/INT-3663)
2. Loading beans from `setBeanFactory()/setApplicationContext()` container methods
* Move all code from `setBeanFactory()` with access to the `BeanFactory` (e.g. `this.messageBuilderFactory = IntegrationUtils.getMessageBuilderFactory(this.beanFactory);`)
to some other lazy-load methods like `getMessageBuilderFactory()`
* Fix parser tests to remove `messageBuilderFactory` tests since there is no activity for target components to lazy-load them
* Polish some test according the new lazy-load logic
* Rework `IntegrationEvaluationContextAwareBeanPostProcessor` to the `SmartInitializingSingleton` and make it `Ordered`
* Populate `beanFactory` for the internal instance of `connectionFactory` in the `TcpSyslogReceivingChannelAdapter`
* Populate `beanFactory` for the internal `UnicastReceivingChannelAdapter` in the `UdpSyslogReceivingChannelAdapter`
* Add `log.info` that `UdpSyslogReceivingChannelAdapter` overrides `outputChannel` for the provided `UnicastReceivingChannelAdapter`
* Change the internal `MessageChannel` in the `UdpSyslogReceivingChannelAdapter` to the `FixedSubscriberChannel` for better performance
* Fix `AbstractExpressionEvaluator`
* Add JavaDocs for the `IntegrationEvaluationContextAware`
Fix `MongoDbMessageStoreClaimCheckIntegrationTests`
Addressing PR comments
JIRA: https://jira.spring.io/browse/INT-3628
Certain tasks in Spring Integration are long running. Indicate
so for the benefit of platforms such as WebLogic that can log warnings
for long running tasks otherwise.
Also fix conflicting versions of commons-io.
JIRA: https://jira.spring.io/browse/INT-3589, https://jira.spring.io/browse/INT-3624
* SF - 4.2. Fix Breaking changes for the `ApplicationEventPublisher`
* AMQP 1.5. Without issues
* Reactor - 2.0. Fix for the new `Stream` foundation
* jsonPath - 1.2.0. Fix for new `Predicate` abstraction. Add 'fail-fast error' to the `IntegrationRegistrar`
* Sshd - 0.13.0. Fix for new `VirtualFileSystemFactory` usage
* Spring Data - Fowler
* And others without issues
* Get rid of `reactor.util.StringUtils` usage
INT-3589: Address PR comments
Polishing
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-3620
Add `setShouldAppendNewLine(boolean shouldAppendNewLine)` method to the
`FileWritingMessageHandler` class. Added similar test methods to the
`FileWritingMessageHandlerTests` class.
INT-3620: `appendNewLine` just only for `FileExistsMode.APPEND`
Also add `appendNewLine` for `File` payload
INT-3620: `appendNewLine` for any `fileExistsMode`
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-3606
Close the store when an (S)FTP synchronizing MessageSource is stopped.
Will need another commit on 4.2.WIP to change to `Lifecycle`.
Add dirty Flag to Properties MetadataStore
Avoid unnecessary persists.
Remove unnecessary implementation of `AbstractInboundFileSynchronizingMessageSource#getComponentType()`
JIRA: https://jira.spring.io/browse/INT-3584
INT-3584: Move `iterator` option to ctor
Polishing
- Javadocs
- Fix String payload (missing 'else')
- Support charsets other than the default
- throw MessagingException instead of RuntimeException
- Add more tests to cover all cases
INT-3584: Throw `MessageHandlingException`
JIRA: https://jira.spring.io/browse/INT-3572
Previously, a blocking queue was used to hold seen files; this was used to enable
FIFO when a max capacity is set.
When used with no capacity, a queue is not needed; also the `contains` operation
on a queue requires a linear search which does not scale well for a large number
of files.
Use a `HashSet` instead to significantly improve the `contains` performance.
Only maintain a queue if a max capacity is set.
Fix `AcceptOnceFileListFilterTests` to be compatible with Java < 8
This commit updates AbstractHeaderMapper in a number of ways:
* The 'userDefinedHeaderPrefix' property has been removed as some
advanced tests revealed that the feature is actually broken right
now and there is no easy way to fix it. A new richer hook point
that indicates if the property comes from the target object or the
standard MessageHeaders has been added.
* A HeaderMatcher interface has been introduced to replace the
lengthy checks in shouldMapHeader. Several implementations
of that interface are provided
* An additional pattern has been added that maps any header that is
*not* a standard header. It uses the standardHeaderPrefix property
for that purpose
* A number of protected method that were only used to create the
instance have been removed in favour of a non default constructor.
Subclasses should provide those *static* values in their own default
constructor.
* The list of transient headers can now be customized. Transient
headers are headers that should never be mapped. The standard
ErrorChannel and ReplyChannel headers have also been removed from
the default transient headers list as they no longer need to be
transient
header-mapper: Polishing
JIRA: https://jira.spring.io/browse/INT-3412
Initial commit - review only.
TODO:
- SFTP Tests
- Namespace/Adapter support for file append
- Docs
INT-3412 Polishing
- Addressed PR comments
- Completed SFTP implementation
- Added namespace/parser support for `FileExistsMode` (append, etc)
- Added SFTP Tests
- Created Embedded SFTP server for tests (similar to FTP)
- Converted tests that needed a real server to use the embedded server
INT-3412 Docs and Polish (PR Comments)
JIRA: https://jira.spring.io/browse/INT-3464
Previously, if an IO exeption occurred while synchronizing
files, and an AcceptOnceFileListFilter is being used, files that were
not transferred would not be fetched next time.
Add strategy `ReversibleFileListFilter` that can rollback previously
accepted files.
Implement this interface on `AcceptOnceFileListFilter` and
`AbstractPersistentAcceptOnceFileListFilter`.
Add test cases.
Polishing
JIRA: https://jira.spring.io/browse/INT-3465
Add support for adding/removing individual recipients to the RecipientListRouter
Modify documentation in what's new and spring-integration-4.1.xsd
Polishing
`AbstractRemoteFileOutboundGateway`: close `outputStream` before `file.delete()` to release exclusive file-lock
JIRA: https://jira.spring.io/browse/INT-2438
If a get operation fails in the outbound gateway,
clean up (remove) the temporary file if present.
Test Polishing
JIRA: https://jira.spring.io/browse/INT-3404
Previously, `AbstractInboundFileSynchronizingMessageSource` implemented both `MessageProducer` and `MessageSource`.
The `MessageProducer` is really redundant and confusing.
Also, it might produce some side-effects when using JavaConfig.
Provide some other simple but important fix for all `AbstractMessageSource` implementation to invoke `super.afterPropertiesSet()`
Polishing
Add mock bean factory to failing tests.
Revert state assertions in AbstractInboundFileSynchronizingMessageSource;
the fields are state, not arguments, at the time they are being
asserted.
JIRA: https://jira.spring.io/browse/INT-3374
Move `getMessageBuilderFactory` from `IntegrationContexUtils`
to `IntegrationUtils`.
Change DOS Newlines to Unix
`AbstractMessageGroupStore`.
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.