Commit Graph

9623 Commits

Author SHA1 Message Date
Gary Russell
585fb0349c INT-3566: JMS Recover Connection During Req/Resp
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
2015-07-16 15:07:55 -04:00
Gary Russell
774e5868f0 INT-3567: JMS Shared Subscriptions
JIRA: https://jira.spring.io/browse/INT-3567

Namespace support for JMS 2.0 shared subscriptions.

INT-3567: AsciiDoc

* `What's New` polishing
* `TcpConnectionEventInboundChannelAdapterParser` deprecation warn fix
2015-07-16 13:41:30 -04:00
Gary Russell
1dba450e8c INT-3773: (S)FTP RemoteFileTemplate Fail/Ignore
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.
2015-07-15 13:44:00 -04:00
Mike Gehard
4e502af54c Link to the latest spring projects site, not an old one. 2015-07-15 11:02:14 -04:00
Gary Russell
c986206059 INT-3229: Add WatchServiceDirectoryScanner
JIRA: https://jira.spring.io/browse/INT-3229

Polishing
2015-07-15 10:54:59 -04:00
Gary Russell
f1fc0edbf3 INT-3425: Deprecate TCP Event Channel Adapter
JIRA: https://jira.spring.io/browse/INT-3425

Deprecate `TcpConnectionEventListeningMessageProducer` in favor
of using a generic event inbound channel adapter.

Polishing
2015-07-15 10:15:42 -04:00
Gary Russell
583d432f22 INT-3764: LastModifiedFileListFilter
JIRA: https://jira.spring.io/browse/INT-3764

* Add JavaDocs to the `LastModifiedFileListFilter`
* Add `Namespace Support` to the `file.adoc`
2015-07-15 09:54:17 -04:00
Nadav Cohen
eb4e0b2d45 Another small typo 2015-07-15 09:53:35 -04:00
Gary Russell
9aca5626a7 INT-3766: Fix Reactor Promise Detection
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`.
2015-07-15 09:52:38 -04:00
nadavc
f7b13fe341 fixed a small typo 2015-07-11 15:32:08 -04:00
Gary Russell
00ef4ce731 Suppress Sonar False Positives
Intentional null return from Boolean method.
2015-07-11 09:10:22 -04:00
Gary Russell
9600006694 INT-3755: Separate Stats Enablement from JMX
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
2015-07-10 18:30:58 -04:00
Gary Russell
c68c7b3412 INT-3763: (S)FTP - Inbound Remote Dir. Expression
JIRA: https://jira.spring.io/browse/INT-3763

Fix `AbstractRemoteFileSynchronizerTests` according to this change.
2015-07-09 18:26:46 -04:00
Gary Russell
5a9b898635 Suppress Sonar Critical Violations
2 "violations" are ok.
2015-07-08 11:41:07 -04:00
Andy Wilkinson
1f900edf37 Use the latest version of the Spring IO Plugin
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.
2015-07-08 09:08:06 -04:00
Gary Russell
154dbd54a3 Revert to SF 4.2.0.BUILD-SNAPSHOT 2015-07-07 11:54:47 -04:00
Spring Buildmaster
62665c8427 [artifactory-release] Next development version 2015-07-06 15:49:35 -07:00
Spring Buildmaster
8a81878a52 [artifactory-release] Release version 4.2.0.M2 2015-07-06 15:49:28 -07:00
Gary Russell
fe203fb712 INT-3747: Zookeeper Documentation
JIRA: https://jira.spring.io/browse/INT-3747

INT-3747: Polishing; PR Comments; Factory Beans

Fix JavaDocs and simple polishing
2015-07-06 17:54:40 -04:00
Gary Russell
814698fbb9 INT-3617: ZK Leader Event Processing
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
2015-07-06 15:54:25 -04:00
Gary Russell
9cc0652b61 INT-3759: Ability to Disable Logging on Main Path
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
2015-07-06 12:20:08 -04:00
Gary Russell
a480354210 INT-3752: Add AggregatingMetricsFactory
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
2015-07-06 10:42:37 -04:00
Gary Russell
5298368168 INT-3760: Document spring.integration.properties
JIRA: https://jira.spring.io/browse/INT-3760
2015-07-02 14:39:06 -04:00
Gary Russell
bf8e79cb1e INT-3583: Allow MessageGroupProcessor in Agg, XML
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
2015-06-30 15:02:23 -04:00
Gary Russell
cef99f3584 INT-2507: File: Fix HeadDirectoryScanner
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).
2015-06-30 12:13:55 -04:00
Gary Russell
029bb28cfa INT-3615: @MessagingGateway Long Properties
JIRA: https://jira.spring.io/browse/INT-3615

Change timeout properties from long to String to allow
property placeholder/SpEL configuration.
2015-06-30 12:05:30 -04:00
Gary Russell
4131c82faf INT-3753: Expose More Metrics via IMBE
JIRA: https://jira.spring.io/browse/INT-3753

INT-3753: Add Channel Send Count to IMBE

Missing accessor for channel send counts.

Expose Full Metrics Objects
2015-06-30 11:39:11 -04:00
Artem Bilan
9c96a14cd1 INT-3749: Revert setters for EC
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.
2015-06-27 12:36:33 -04:00
Artem Bilan
3392d4e1ab INT-3749: Get rid of IECA logic
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());
 }
 ```
2015-06-24 14:57:00 -04:00
Artem Bilan
fe98cbc4e0 Zookeeper: fix JavaDocs errors
https://build.spring.io/browse/INT-B41-314
2015-06-24 12:09:28 -04:00
Gary Russell
06ffc19b0b INT-3616: Zookeeper LockRegistry
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
2015-06-24 11:53:04 -04:00
Gary Russell
ec5230abc7 INT-3654: Rework TCP Connection Close
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.
2015-06-23 15:35:10 -04:00
Justin Walsh
1dd17ad319 Fix minor typo in Docs 2015-06-23 15:33:48 -04:00
Gary Russell
f3d525a5e8 INT-3642: Improve MessageGroupStore Removal
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
2015-06-23 15:25:24 -04:00
Gary Russell
0065ed8c49 INT-3751: Fix Python Scripting
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.
2015-06-23 13:25:57 -04:00
Marius Bogoevici
54a0d0c26a Zookeeper: use a single ZK instance in tests 2015-06-23 13:24:03 -04:00
Marius Bogoevici
ec1154fb93 INT-3748: BridgeHandler: don't copy headers
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
2015-06-19 15:19:47 -04:00
Gary Russell
f4104c199a INT-3745: More TCP Events (Failed Correlation)
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
2015-06-19 13:49:10 -04:00
Gary Russell
65d2024937 INT-3737: (S)FTP Outbound Gateway Streaming GET
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.
2015-06-19 13:39:36 -04:00
Gary Russell
5e9624f2cf INT-3724: Gateway - Support CompletableFuture
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
2015-06-18 16:52:17 -04:00
Gary Russell
3d5f7db4b2 INT-4740: FileSplitter - Add Headers
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
2015-06-18 13:55:52 -04:00
Gary Russell
6436aa6d32 INT-3600: FileSplitter Namespace and Docs
JIRA: https://jira.spring.io/browse/INT-3600

Add `<int-file:splitter/>` namespace component.
Add `FileSplitter` documentation.

Polishing
2015-06-18 13:45:16 -04:00
Gunnar Hillert
247232bdde INT-3659: InputStream support in FileWritingMH
https://jira.spring.io/browse/INT-3659

Add `InputStream` `payload` handling to the `FileWritingMessageHandler`
2015-06-17 20:57:37 -04:00
Gary Russell
da54a1262d INT-3739: FileSplitter - Add LineCount to EOF Mark
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.
2015-06-17 17:59:00 -04:00
Gary Russell
c278548216 INT-3738: Fix FileSplitter
JIRA: https://jira.spring.io/browse/INT-3738

Don't rely on `BufferedReader.ready()` to detect EOF.

Polishing FileSplitter Fix
2015-06-17 17:21:48 -04:00
Gary Russell
505bfac2f8 INT-3735: (S)FTP Fix Schema Expected Type
JIRA: https://jira.spring.io/browse/INT-3735
2015-06-17 16:12:06 -04:00
Gary Russell
58e99b01e1 INT-3744: Fix IMAPMessage receivedDate
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
2015-06-17 16:07:18 -04:00
Gary Russell
f32fd1967b INT-3742: spring-data-gemfire 1.7 Compatibility
JIRA: https://jira.spring.io/browse/INT-3742

Deprecate the message store ctor that takes a `Cache` argument.
2015-06-17 16:06:00 -04:00
Marius Bogoevici
8782d097cf INT-3691 Add ZookeeperMetadataStore
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`
2015-06-17 13:54:35 -04:00
Gary Russell
51b52ea3a6 INT-3727: FileSplitter - add SOF/EOF Capability
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
2015-06-08 13:52:48 -04:00