Commit Graph

8462 Commits

Author SHA1 Message Date
Gary Russell
ea4763faa9 INT-4095: Support Limiting (S)FTP Files Fetched
JIRA: https://jira.spring.io/browse/INT-4095

Limit the number of remote files fetched on each poll (when it is necessary to fetch files).

Polishing - PR Comments

Polishing - Decouple MaxFetchSize from Poller

Polishing - PR Comments

Schemas and Docs

More Polishing

* Polishing according PR comments
2016-08-26 13:36:14 -04:00
Artem Bilan
53237aa833 INT-4102: autoStartup = false for JMS container
JIRA: https://jira.spring.io/browse/INT-4102

There is inconsistency when we mark `JmsMessageDrivenEndpoint` for `autoStartup = false`,
but external container can still be started by the application context, because of it own default `autoStartup = true`.

* Mark `container` `autoStartup = false` in the `JmsMessageDrivenEndpoint` ctor to align lifecycles.

**Cherry-pick to 4.3.x**
2016-08-24 10:21:34 -04:00
Gary Russell
dfb6ab1e08 INT-4098: IMAP Content Rendering Consistency
JIRA: https://jira.spring.io/browse/INT-4098

Polishing - What's New

Schema Polishing

Also fix a test to align it with changes to the test mail server.
2016-08-23 12:20:25 -04:00
Artem Bilan
76bb3ada32 Ignore Exponential Moving Average Tests
https://build.spring.io/browse/INT-SI43X-6/

Since Exponential Moving Average algorithm is fully based on the time in between events, it is very difficult to reach the stable tests.
All of them used to fail from time to time on the slow CI server.

Mark all Exponential Moving Average Tests with `@Ignore`.

The manual testing is required in case of some changes.

**Cherry-pick to 4.3.x**
2016-08-23 11:43:15 -04:00
Artem Bilan
64578c5670 JdbcLRLeaderInitTests: increase latch timeouts
https://build.spring.io/browse/INT-MASTER-338/

Increase latch timeouts to 20 seconds in favor of assumption that there is some timing problems with embedded H2 on heavy-duty CI server
2016-08-23 11:25:54 -04:00
Kevin Bowersox
0ebb4aa0f5 Fix SPEL syntax for headers in the ftp.adoc 2016-08-23 11:09:52 -04:00
Artem Bilan
6ffdd5eee3 ZkLockRegistryTests: increase tryLock timeout
https://build.spring.io/browse/INT-AT42SIO-253/

 ```
 java.lang.AssertionError: Should have been able to lock with zookeeper server restarted!
 	at org.junit.Assert.fail(Assert.java:88)
 	at org.junit.Assert.assertTrue(Assert.java:41)
 	at org.springframework.integration.zookeeper.lock.ZkLockRegistryTests.voidLockFailsWhenServerDown(ZkLockRegistryTests.java:339)
 ```

 When we do `testingServer.restart();` we should give more time to let it started on background, therefore increase the next `lock2.tryLock()` to 10 seconds.

 **Cherry-pick to 4.3.x and 4.2.x**
2016-08-23 11:01:47 -04:00
Artem Bilan
4f4bb18157 Tracing: Add log message for locks in store 2016-08-22 19:29:11 -04:00
Gary Russell
9f40d896a2 INT-4092: Add errorChannel Header with Void Return
JIRA: https://jira.spring.io/browse/INT-4092

Polishing

Polishing

Polish of Polishing
2016-08-22 18:10:30 -04:00
Artem Bilan
52904c7106 INT-4099: Fix closableResource typo
JIRA: https://jira.spring.io/browse/INT-4099

The `IntegrationMessageHeaderAccessor.CLOSEABLE_RESOURCE` value has a typo

* Fix the typo in the `IntegrationMessageHeaderAccessor.CLOSEABLE_RESOURCE` constant value
* Fix the same type in the (s)ftp.adoc
2016-08-22 15:38:07 -04:00
Gary Russell
77d0becd97 INT-4066: Expose RMI Factory Bean
JIRA: https://jira.spring.io/browse/INT-4066

Allow customization.

Rename To RmiProxyFactoryBeanConfigurer

Polishing

More Polishing

Polishing
2016-08-22 15:37:06 -04:00
Artem Bilan
2a0e56ba6c jms.adoc: Fix typos in extract-payload paragraph
SO: http://stackoverflow.com/questions/39064020/spring-integration-jms
2016-08-22 10:04:42 -04:00
Gary Russell
5f2f7d8b83 INT-3941: Align JMS Config with Spring Boot
JIRA: https://jira.spring.io/browse/INT-3941

Previously, like the SF `<jms:/>` namespace, Spring Integration used a default bean
name `connectionFactory` for the JMS Connection Factory.

Spring Boot auto-configures a bean name `jmsConnectionFactory`.

Since it is still common to use Spring Integration XML configuration with Spring Boot,
it is useful to align the two so that an SI app can use the auto configured bean.

Docs polishing

Doc Polishing
2016-08-19 17:15:57 -04:00
Gary Russell
ea5bbe83e5 INT-4062: Reject Exec. Channel Early Subscription
JIRA: https://jira.spring.io/browse/INT-4062

Only Enforce When an Executor is Provided

With `ExecutorChannel` and `PublishSubscribeChannel` (when an executor is provided),
any early subscription is lost because the dispatcher is replaced.

checkstyle
2016-08-19 17:08:07 -04:00
Gareth Chapman
3742899cb1 INT-4069: Use AnnotatedElementUtils
JIRA: https://jira.spring.io/browse/INT-4069

Finding annotations with AnnotatedElementUtils allows us to use
explicit annotation attribute overrides specified by the @AliasFor
annotation.
2016-08-19 16:29:53 -04:00
Gary Russell
c0ce6cee1d Move TestMailServer to spring-integration-test
JIRA: https://jira.spring.io/browse/INT-4022
2016-08-19 13:54:06 -04:00
Artem Bilan
c54f547d14 Move Reference Manual to 5.0 2016-08-18 15:57:09 -04:00
Gary Russell
04a42f54be Rename Schemas to 5.0
Fix Schema Imports

spring.schemas
2016-08-18 14:40:38 -04:00
Artem Bilan
d6045aa48b Fix Checkstyle violations 2016-08-18 14:32:46 -04:00
Artem Bilan
6ccad0daa8 Upgrades and fixes for compatibility 2016-08-18 12:42:06 -04:00
Artem Bilan
11151efc8c Upgrade to SF-5.0 and Reactor-3.0 2016-08-17 16:23:21 -04:00
Artem Bilan
8a577de83f Make AbstractMessageHandler as Subscriber
* Upgrade to the latest Reactor-2.5.0
* Fix all `Promise` and `Streams` mentioning to the `Mono` and `Flux`
* Add `ReactiveEndpoint.SubscribableChannelPublisherAdapter` to adapt `SubscribableChannel` into a `Publisher` for Reactive downstream
2016-08-17 16:23:04 -04:00
Artem Bilan
abb8b0152c Fixes according the latest Reactor 2016-08-17 16:23:04 -04:00
Artem Bilan
1ae05c325f Upgrade to the latest Reactor 2016-08-17 16:23:04 -04:00
Artem Bilan
e6af887972 Upgrade to Rector-2.5 2016-08-17 16:23:04 -04:00
Artem Bilan
3eae0239bf SI-5.0: ReactiveMessageChannel & ReactiveEndpoint
* Add `ReactiveMessageChannel` implementation based on the provided `Processor<?>` for internal dispatching logic.
Implement the `Publisher<?>` contract to allow downstream `Subscriber<?>`
* Add `ReactiveEndpoint` implementation to deal with the `ReactiveMessageChannel` through the Reactive Streams contract.
* Add appropriate `ReactiveEndpoint` building logic to the `ConsumerEndpointFactoryBean` and `AbstractMethodAnnotationPostProcessor`
* Rework Gateway to use `Publisher<?>` contract instead of `Promise` implementation.
2016-08-17 16:23:03 -04:00
Artem Bilan
e7b30eba5c INT-4082: Fix MongoDB MessageStore for auditing
JIRA: https://jira.spring.io/browse/INT-4082

Starting with Spring Data 1.9 the `MappingContextIsNewStrategyFactory` relies on a newly introduced `PersistentEntities` and doesn't register entities lazily any more.
Such a change finishes with the `Unsupported entity` exception when an auditing is switched on (`<mongo:auditing/>`)
for the `MongoDbMessageStore` and `AbstractConfigurableMongoDbMessageStore` internally created `MongoTemplate` and `MessageWrapper` and `MessageDocument` SI internal entities.

* Don't register `ApplicationContext` into internally created `MongoTemplate`s since to avoid entity events emitting for `MessageWrapper` and `MessageDocument`
* Pull `MongoDbMessageBytesConverter` to the top-level class to let customize `MappingMongoConverter` properly if there is need to audit `MessageDocument` anyway,
what can be possible via external injections into `AbstractConfigurableMongoDbMessageStore` implementation
* Fix `mongodb.adoc` for some typos

**Cherry-pick to 4.2.x**
2016-08-17 15:29:51 -04:00
Artem Bilan
63e36cadb6 INT-4087: Fix tryLock(timeout) Contract for ZK
JIRA: https://jira.spring.io/browse/INT-4087
Fixes GH-1863 (https://github.com/spring-projects/spring-integration/issues/1863)

If ZK Client loses the connection to ensemble, it tries to reconnect on the next operation and does that exactly for the `connectionTimeoutMs` and provided `RetryPolicy`.
According to the `Lock.tryLock(long time, TimeUnit unit)` contract we can wait for the lock only during provided `timeout`.

* Introduce `mutexTaskExecutor` and perform `ZK.forPath()` command in the separate `Thread` and wait for the `Future` during provided timeout.
* Perform `mutex.acquire()` only after successful `Future` result and only for the remained timeout.

**Cherry-pick to 4.2.x**

Add `setMutexTaskExecutor()`

Fix Checkstyle typo

Javadoc
2016-08-17 13:59:21 -04:00
Artem Bilan
191f3bb1fd Fix Spring AMQP JavaDocs link
https://build.spring.io/browse/INT-AT42SIO-247/

**Cherry-pick to 4.2.x**
2016-08-17 10:23:27 -04:00
Gary Russell
3b891e9e67 INT-4097: Fix Test IMAP Mail Server
JIRA: https://jira.spring.io/browse/INT-4097

Mismatched From/To headers when using a header mapper.
2016-08-16 18:24:53 -04:00
Gary Russell
c0f2d6d738 Overview Doc Polishing 2016-08-16 11:37:10 -04:00
Artem Bilan
7124136091 Some Fixes and Improvements
* Fix several typos in log messages. And some test on the matter as well
* Add comment to `AbstractPersistentAcceptOnceFileListFilter.rollback()` to clarify the reason of `rollingBack` variable
* Make `RemoteFileTemplate.StreamHolder` as `static` to avoid extra internal variable to outer class instance
* Replace `MessagingException` with `AbstractInboundFileSynchronizingMessageSource` in `init()` method of some components. It isn't Messaging yet in that phase
* Fix `SubscribableRedisChannel.MessageListenerDelegate` to handle `Object` not `String`, because with the `serializer` injection there is no guaranty that incoming is always `String`
* Move `JSch.setLogger(new JschLogger());` in the `DefaultSftpSessionFactory` to `static` block. It really should be done only once
* Remove `Assert.isTrue(this.port >= 0)` from the `DefaultSftpSessionFactory`. The subsequant `initJschSession()` convert it to default `22` port
* Change in the `JschProxyFactoryBean` `UnsupportedOperationException` to `IllegalArgumentException`. Wrong enum is wrong argument. That isn't a problem of operation
* Simplify `stop()` in the `CuratorFrameworkFactoryBean` and mark it as a `this.running = false`. Otherwise it wasn't able to be restarted
* Expose `leaderEventPublisher` in the `LeaderInitiatorFactoryBean`  and fix `stop(Runnable callback)` with propagation `callback` to delegate.

Fix `SubscribableRedisChannelTests` for new `handleMessage(Object)` signature
2016-08-12 12:47:32 -04:00
Artem Bilan
28216013dd Fix some typos in IP module (JavaDocs, comments) 2016-08-11 21:39:59 -04:00
Artem Bilan
014ed83967 Fix SF-4.3.3 Compatibility
https://build.spring.io/browse/INT-B43-JOB1-274
2016-08-10 19:28:46 -04:00
Artem Bilan
19b6b0409e INT-4088 ZookeeperLeaderTests: fix race condition
Two initiators for the same path, same `SmartLifecycleRoleController` and, finally, same `adapter`.
So, one initiator after `yield()` stops the `adapter` and at the same time another starts it.

Since there is no barrier in between events and assertion, we end up with an early "re-granting".

* Add `CountDownLatch yieldBarrier` to `countDown()` after performing second `adapter.isRunning()` assert
* `LeaderEventPublisher` waits for the `yieldBarrier` after the first `OnRevokedEvent`
2016-08-10 16:31:02 -04:00
Artem Bilan
3b7d2aaf9b Fix typos in the scatter-gather.adoc 2016-08-10 09:27:27 -04:00
Gary Russell
d0008c368e INT-4085: Access ARPMH from RequestHandlerAdvice
JIRA: https://jira.spring.io/browse/INT-4085

Polishing - PR Comments
2016-08-09 09:54:41 -04:00
Gary Russell
2a66f39df1 TCP/UDP: Use OS to Select Test Ports
https://build.spring.io/browse/INT-AT42SIO-228/
2016-07-29 16:32:38 -04:00
Artem Bilan
d00e0cdcc1 Document Java(DSL) for (S)FTP Outbound
SO: http://stackoverflow.com/questions/38654837/retreive-files-from-ftp-using-spring-integration-ftpoutboundgateway
2016-07-29 12:45:25 -04:00
Gary Russell
ebbd28c415 INT-4083: RedisLockRegistryTests - Diagnostics
JIRA: https://jira.spring.io/browse/INT-4083
2016-07-29 11:11:57 -04:00
Gary Russell
6eba49c625 INT-4080: Add TcpConnectionFailedEvent
JIRA: https://jira.spring.io/browse/INT-4080
2016-07-26 12:02:14 -04:00
Artem Bilan
5d19f380a9 INT-4078: Don't copy headers in the Resequencer
JIRA: https://jira.spring.io/browse/INT-4078

Even if it doesn't hurt to `copyHeadersIfAbsent()`, when it just adds a new headers and doesn't override existing like sequence details,
it doesn't sound reasonable for `Resequencer` to modify the message before and after its resequence logic.

* Change `shouldCopyRequestHeaders()` to `false` for `ResequencingMessageHandler`
2016-07-26 11:52:43 -04:00
Artem Bilan
4819665705 build.gradle: Remove java plugin from the root
To avoid extra empty `spring-integration-[VERSION].jar` from distribution remove `java` plugin usage from the root module of the project
2016-07-25 14:49:22 -04:00
Spring Buildmaster
5fa29476bb [artifactory-release] Next development version 2016-07-25 16:44:09 +00:00
Spring Buildmaster
c29e92ac37 [artifactory-release] Release version 4.3.1.RELEASE 2016-07-25 16:43:51 +00:00
Artem Bilan
6df5ffbca1 Upgrade to Spring AMQP 1.6.1 2016-07-25 12:08:09 -04:00
Vedran Pavic
91aaae1f06 Polish JDBC documentation: typos and links 2016-07-25 10:21:33 -04:00
Gary Russell
f9a6a61d07 INT-4077: Increase Timeouts in JMS Test Case
JIRA: https://jira.spring.io/browse/INT-4077

Default timeout (5 secs) is insufficient on a busy build server.
2016-07-25 09:45:07 -04:00
Artem Bilan
d9f9f9e3ca INT-4064: Simplify IdempotentReInt Java Config
JIRA: https://jira.spring.io/browse/INT-4064

We configure `IdempotentReceiver` via `<int:idempotent-receiver>` component or `@IdempotentReceiver` annotation.
In case of regular Java config, e.g. direct `ConsumerEndpointFactoryBean` usage or Java DSL,
it isn't possible to configure `idempotentReceiverInterceptor` enough easy

* Introduce `if...else` logic into `ConsumerEndpointFactoryBean` to proxy `MessageHandler`,
if `adviceChain` contains an newly-introduced `HandleMessageAdvice`.
And do that independently if `MessageHandler` is `AbstractReplyProducingMessageHandler`
* Make `idempotentReceiverInterceptor extends HandleMessageAdvice`
* Skip `HandleMessageAdvice` in the `AbstractReplyProducingMessageHandler`
* Add advice applying logic into the `AbstractMethodAnnotationPostProcessor` as well

Introduce `HandleMessageAdvice` marker interceptor to cover the case when an `Advice` can be advices as well.
Remove unused `setAdviceChainIfPresent()` method in the `AbstractMethodAnnotationPostProcessor`

Document `HandleMessageAdvice`

Increase wait latch timeouts in the `LockRegistryLeaderInitiatorTests`

Doc Polishing
2016-07-22 13:56:41 -04:00
Artem Bilan
f74ddc2aa6 INT-4063: Extend Types for DefXmlPayloadConverter
JIRA: https://jira.spring.io/browse/INT-4063

Since `DefaultXmlPayloadConverter` is used from many out-of-the-box components by default,
make it more flexible with the supported input types which can be converted into `Document`

Improve `xml.adoc` about this types and also fix a lot of typos there as well

Address PR comments
2016-07-22 13:38:10 -04:00