JIRA: https://jira.spring.io/browse/INT-3566
When using a named replyTo queue/topic if the connection was lost between the
request and reply, the connection was not recovered.
Retry consuming until the timeout expires.
INT-3566: Polishing; PR Comments
INT-3566: Remove Broker from Test Case
JIRA: https://jira.spring.io/browse/INT-3773
When the `FileExistsMode` was `FAIL` or `IGNORE` and the remote file
did NOT exist, the file was not written.
JIRA: https://jira.spring.io/browse/INT-3425
Deprecate `TcpConnectionEventListeningMessageProducer` in favor
of using a generic event inbound channel adapter.
Polishing
JIRA: https://jira.spring.io/browse/INT-3766
Previously the `GatewayProxyFactoryBean` detected the presence of `Environment` before
looking for `Promise` return types. This caused initialization failures if
`reactor-core` was on the classpath, but not `reactor-stream`.
Change `reactorPresent` to look for the `Promise` class intead of `Environment`.
JIRA: https://jira.spring.io/browse/INT-3755
JIRA: https://jira.spring.io/browse/INT-3756
Previously JMX was required to enable capturing message counts and statistics.
This is now a separate operation from JMX and can be enabled independently.
For backwards compatibility, enabling JMX will automatically enable statistics
(unless separately configured).
INT-3755: Polishing; PR Comments
Doc Polishing
JavaDocs polishing
Spring IO Platform 2.0 will remove the managed versions .properties
file as support for it has been removed in Spring Boot 1.3.
This commit moves the build onto a new version of the Spring IO Plugin
that uses the Maven bom rather than the properties file.
JIRA: https://jira.spring.io/browse/INT-3617
Start/stop `SmartLifecyle` beans with leader election/revocation.
ZK Namespace Support
Add Annotation Support
INT-3617: Polishing
Add `SmartLifecycle` to listener parser.
INT-3617: Polishing; PR Comments
Revert SmartLifecycleRoleController
Remove reflection.
Remove Dependence on spring-cloud-cluster
Temporarily move the relevant classes here.
Polishing; PR Comments and Fix Test
Test was incorrectly stopping the LeaderInitiator before it was elected.
Set auto-startup="false" in the i-c-a so we wait for its start before
stopping the LeaderInitiator.
Fix JavaDocs
JIRA: https://jira.spring.io/browse/INT-3759
Add `IntegrationManagementConfigurer` to globally set the default.
This will be documented/expanded when JIRAs 3755/3756 are implemented.
Polishing; PR Comments
Test Polishing
JIRA: https://jira.spring.io/browse/INT-3752
JIRA: https://jira.spring.io/browse/INT-3754
The statistics are based on this count so, for example the
`meanSendDuration` reflects the mean of total duration from the first send to
the last in each batch.
Also change the linked lists to `Deque`s.
Also remove `isTraceEnabled()` calls - too expensive in high volume environments.
Polishing
Assign the count to a local variable so the mod (%) operation is short
circuited rather than short circuiting the call to isFullStatsEnabled().
INT-3752: Fix Aggregating Metrics
Previously, the duration was for the first message in each sample.
We need to capture the total elapsed time for the sample and use it
for the duration calculation.
Add 'newCount' to the context so the after... method can calculate
the duration at the end of the sample.
The start field does not need to be volatile because its updates
are synchronized.
INT-3752: Fix Javadocs
JIRA: https://jira.spring.io/browse/INT-3583
Previously, the `ref` or inner bean for an aggregator was wrapped
in a `MethodInvokingMessageGroupProcessor` for POJO aggregation logic.
Now, if the ref'd bean is a `MessageGroupProcessor`, it is used as the
output processor directly.
Also, the `SimpleMessageGroupProcessor` is added which simply returns the
collection of messages.
INT-3583: Polishing; PR Comments
Fix AsciiDoc
Revert `CorrelationMessageBarrier` deprecation
Fix Docs for wrong chapter link
JIRA: https://jira.spring.io/browse/INT-2507
When using a `HeadDirectoryScanner`, the use of any filter removed the
size limitation passed into the contstructor (or `queue-size` attribute
of a file inbound channel adapter.
The `HeadFilter` was overwritten.
Combine the head filter into a `CompositeFileListFilter` (creating one
if necessary).
JIRA: https://jira.spring.io/browse/INT-3749
Since some target application could inject there is `EvaluationContext` before, removal of
`setIntegrationEvaluationContext()` is breaking change.
This fix reverts all those setters.
JIRA: https://jira.spring.io/browse/INT-3749
Since `IntegrationEvaluationContextAware` isn't so "context-free" resource like `BeanFactory`
and `ApplicationContext`, but just a specific bean in the context, we can't follow with `BeanPostProcessor` logic - bad architecture by level of responsibility.
Therefore we should follow with standard Dependency Injection mechanism to retrieve `evaluationContext` for the particular component.
Since we can't rely on the `@Autowired` because SI can be used from the raw XML configuration,
we use utility method instead. The pattern to get the proper `integrationEvaluationContext` is:
```
@Override
protected void onInit() throws Exception {
super.onInit();
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(getBeanFactory());
}
```
JIRA: https://jira.spring.io/browse/INT-3616
Zookeeper implementation of `LockRegistry`, for example to support
clustered aggregators (when using external message group stores).
INT-3616: Polishing; PR Comments
JIRA: https://jira.spring.io/browse/INT-3654
Previously, single-use `TcpConnections` self-closed when their use was complete.
This is unnatural and caused issues such as INT-3722.
Remove the self-closing behavior; connection close is now (properly) the responsibility
of the client using the connection:
- Client Side:
-- `TcpOutboundGateway` after the reply is received
-- `TcpSendingMessageHandler` after the send, when there is no collaborating inbound adapter
-- `TcpReceivingChannelAdapter` when it is collaborating (after receiving the reply)
- Server Side:
-- `TcpInboundGateway` after the reply is sent
-- `TcpReceivingChannelAdapter` after the receive, when there is no collaborating outbound adapter
-- `TcpSendingMessageHandler` when it is colllaborating (after sending the reply)
As before, the `CachingClientConnectionFactory` always sets single use on the target factory
to force it to create new connections on demand. It is always a single-use factory itself
so the clients return the connections to the pool (via `close()`).
__Needs a migration guide entry__
INT-3654: Fix Late Listener Registration
Timing failures in `TcpOutboundGatewayTests.testFailoverCached()` (null listener).
The `FailoverClientConnectionFactory` registers its listener with the actual
connections it retrieves from a delegate.
When nesting failover and cached connection factories, we need to propagate the
`enableManualListenerRegistration` to the delegate factories so the connection
will wait for its listener to be registered.
JIRA: https://jira.spring.io/browse/INT-3642
Currently, `removeMessageFromGroup` rebuilds the group on every removal.
In every case where this method is used in the framework, the result is not used.
Add `removeMessagesFromGroup` that removes a collection of messages and returns no result.
INT-3642: Polishing - PR Comments
INT-3642: Polishing and Fix Group Metadata Size
JIRA: https://jira.spring.io/browse/INT-3751
Result was null when `executeScript()` was invoked with non-null variables.
When variable are provided, the result variable is stored in the provided bindings.
JIRA: https://jira.spring.io/browse/INT-3748
- override `shouldCopyRequestHeaders` to return false;
- modify existing tests (not specific to `BridgeHandler`) that rely on the fact that `BridgeHandler` copies headers and creates a new message instance to use a custom test handler with the expected behaviour;
INT-3748 Polishing
- moved test RequestHeaderCopyingMessageHandler
- updated author tags and copyrights
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-3724
Add support for `CompletableFuture<?>` return types on gateway methods, if JDK8 is being used.
- If the return type is exactly `CompletableFuture` and an async executor is provided, use `CompletableFuture.supplyAsync()`
- If there is no return async executor, return types can be `CompletableFuture` or a subclass and the flow can return such a future.
- Also fixes a problem for return type `Future<Message<?>>` with no async executor; previously this caused a `ClassCastException`
because the gateway returned the message - it assumed such return types would always run on an excutor.
We can consider back-porting this last part, but nobody has complained.
CompletableFuture Docs
Fix typos, polishing for JavaDocs and some code style polishing
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-3744
MimeMessages are copied to eagerly fetch IMAP messages, this process loses
the `receivedDate` property.
Keep a reference to the source Message and delegate to its `receiveDate()`.
Cover more "void" getters
JIRA: https://jira.spring.io/browse/INT-3691
- create new core interfaces `ListenableMetadataStore` and `MessageStoreListener`;
- create new module `spring-integration-zookeeper`;
- add `ZookeeperMetadataStore` implementation
Polishing
Polishing
- moved classes into core/test where necessary, including conversion methods
- properly renamed `MetadataStoreListenerAdapter`
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