Commit Graph

8853 Commits

Author SHA1 Message Date
Artem Bilan
a1c42f65d0 Fix timing issue in test for STOMP Server
https://build.spring.io/browse/INT-MASTER-733

The Netty tries to load `netty-transport-native-epoll` too long, more
then 10 seconds we expect in the `AbstractStompSessionManager`, therefore
 we end up having `StompConnectionFailedEvent` as a first event in the
queue channel for STOMP events.

* Increase connection wait timeout to `30 secs`, like it is in many other
places in Spring
* Provide some Java 8 style refactoring for the `AbstractStompSessionManager`
* Fix `StompServerIntegrationTests` to poll events from queue until
`StompSessionConnectedEvent` any way
* Upgrade to Gradle 4.0 and `spring-io-plugin-0.0.8`
* Bump `org.sonarqube` version to `2.5` - `2.1` isn't compatible with Gradle 4.0
2017-06-23 15:41:37 -04:00
Gary Russell
0903df9676 INT-4303: (S)FTP MGET with FileExistsMode.IGNORE
JIRA: https://jira.spring.io/browse/INT-4303

Don't emit ignored files in the output message payload.

Also, always preserve the timestamp when using `FileExistsMode.REPLACE_IF_MODIFIED`.

Some code style polishing
2017-06-23 14:02:03 -04:00
Artem Bilan
4679c9bdbe INT-4302: Add fileExistsMode() to Java DSL
JIRA: https://jira.spring.io/browse/INT-4302

Add `RemoteFileOutboundGatewaySpec#fileExistsMode()`
2017-06-23 13:32:55 -04:00
Artem Bilan
171d169748 Fix JDBC tests to close embedded DB
https://build.spring.io/browse/INT-MJATS41-1030

**Cherry-pick to 4.3.x**
2017-06-23 09:10:32 -04:00
Gary Russell
e16e81f780 Revert ftp test log4j 2017-06-22 20:14:50 -04:00
Gary Russell
6b6782e16b (S)FTP Doc Polishing 2017-06-22 20:11:49 -04:00
Artem Bilan
d766d233f5 Fix ReactiveStreamsConsumerTests and Checkstyle
Also increase timeouts in the `RedisAvailableRule`
2017-06-21 12:12:49 -04:00
Artem Bilan
a834ce9ffb FluxMessageChannel.send: no subscribers assertion 2017-06-21 11:10:41 -04:00
Artem Bilan
ecb7d03895 Upgrade to the latest SF and fix HTTP Reactive
https://build.spring.io/browse/INT-FATS5IC-206/

Also use `AopUtils.getTargetClass()` directly in the
`ReactiveHttpRequestExecutingMessageHandler` since it never returns `null`
2017-06-21 10:43:36 -04:00
Gary Russell
42dd05d655 INT-4298: Add Interface HeaderPropagationAware
JIRA: https://jira.spring.io/browse/INT-4298

Used to indicate components that can propagate headers; allows suppression.

Move Interface to AbstractMessageProducingHandler

Add Docs

* Fix typo in doc
2017-06-20 10:44:08 -04:00
Gary Russell
4ca91d912c INT-4295: XML Schema (Legacy) Documentation
JIRA: https://jira.spring.io/browse/INT-4295

Also fixed link to github in the online core schema.
2017-06-19 11:30:51 -04:00
Gary Russell
a38bf60332 INT-4271: FWMH: Fix Race Condition with stop()
JIRA: https://jira.spring.io/browse/INT-4271

The `Flusher.run()` is `synchronized` on the `FWMH`; a `stop()` while it's running will interrupt the task
which could cause a state to be removed without a flush actually happening (interrupt
on lock acquisition).

- synchronize `stop()` so it won't interrupt a running flusher
- detect an interrupt in the flusher and stop flushing


**Cherry-pick to 4.3.x**
2017-06-19 10:38:24 -04:00
Gary Russell
404c2c5369 INT-4296: Fix APPEND_NO_FLUSH Timing Problem
JIRA: https://jira.spring.io/browse/INT-4296

The `FileState.close()` method correctly acquires the lock to prevent closing while
writing. However, with a short flush interval, the close could occur between state
creation and the write operation acquiring the lock.

Move the state creation to within the scope of the lock acquired by the writer.
2017-06-19 10:02:32 -04:00
Spring Buildmaster
efd944cefe [artifactory-release] Next development version 2017-06-15 22:53:46 +00:00
Spring Buildmaster
207483a3a6 [artifactory-release] Release version 5.0.0.M5 2017-06-15 22:53:39 +00:00
Gary Russell
b00a01bfca Update To Spring Framework 5.0.0.RC2, Sec 5.0.0.M2 2017-06-15 18:03:29 -04:00
Artem Bilan
fab0f5478f INT-4284: Remove info about readOnly headers
JIRA: https://jira.spring.io/browse/INT-4284

**Cherry-pick to 4.3.x**
2017-06-15 11:05:45 -04:00
Artem Bilan
4a47a7ce45 INT-4284: Exception to overwrite id or timestamp
JIRA: https://jira.spring.io/browse/INT-4284

To inform end-user that he/she can't override `id` and `timestamp` headers
throw a `BeanInitializationException` from the `gateway`, `header-enricher`,
`enricher` and `header-filter`  configuration when `id` and `timestamp` are
explicitly provided
2017-06-14 13:02:36 -04:00
Artem Bilan
99224f54c0 INT-4290: JacksonJsonUtils: Add Trusted Packages
JIRA: https://jira.spring.io/browse/INT-4290

See CVE-2017-4995

To disallow deserialization of unknown classes,
the `JacksonJsonUtils#messagingAwareMapper()` can now be supplied
with the `trustedPackages`.
The default list is:
```
java.util
java.lang
org.springframework.messaging.support
org.springframework.integration.support
org.springframework.integration.message
org.springframework.integration.store
```
Can be configured with `*` (asterisk) with meaning trust all

**Cherry-pick to 4.3.x**

Polishing according PR comments
2017-06-14 12:35:32 -04:00
Artem Bilan
cc4a166be5 Upgrade to Spring Data Kay M2 2017-06-14 12:09:28 -04:00
Artem Bilan
db692b1d8c Revert to Spring AMQP 2.0.0.M4
Since we don't have one more Spring AMQP 2.0 Milestone for upcoming
Spring Boot Milestone Spring Integration Milestone must be compatible
with current IO state.

* Replace `AmqpHeaders.RAW_MESSAGE` to the
`AmqpMessageHeaderErrorMessageStrategy.AMQP_RAW_MESSAGE` constant
2017-06-13 09:31:37 -04:00
Artem Bilan
6e38ed1dae Upgrade to Reactor 3.1.0.M2
https://build.spring.io/browse/INT-FATS5IC-197/
2017-06-12 11:56:27 -04:00
Artem Bilan
9c7c6dccfc Adapt to the latest Spring Data Redis 2017-06-08 17:06:28 -04:00
Artem Bilan
c053e46269 Revert to io.projectreactor.addons:reactor-test 2017-06-08 11:54:48 -04:00
Artem Bilan
83bd7f4bd3 Rallback to Reactor 3.1 M1
https://build.spring.io/browse/INT-MASTER-708/

Since SF hasn't been adapted to Reactor 3.1 M2, we can't upgrade either
2017-06-08 11:46:34 -04:00
Artem Bilan
1a019b85c2 Upgrade to Reactor-3.1.0.M2 & Reactor-Netty-0.6.4 2017-06-08 11:25:26 -04:00
Gary Russell
c7aa508434 Fix JMS Outbound Gateway
45ae138091 caused the reply destination to overridden to "".
2017-06-08 10:48:17 -04:00
Artem Bilan
fabc5fb725 Fix STOMP and WebSocket modules to the latest SF
* The `@MessageMapping` now requires `@SendTo` for replies
even if we are going to send to the default topic
* Fix assertion for exception message in the `StompInboundChannelAdapterWebSocketIntegrationTests`
2017-06-07 15:26:55 -04:00
Gary Russell
71149f260a Fix s-i-core and SF @Nullable Changes 2017-06-07 15:09:43 -04:00
Artem Bilan
45ae138091 Fix JMS and JMX module to the latest SF
* Fix `ControlBusParserTests` test to pass `Object.class` to the
`MessageConverter` since we can't use `null` there any more
* Fix `JmsOutboundGateway` for empty string for the
`replyDestinationName` since we can't pass `null` there any more
2017-06-07 14:34:01 -04:00
Gary Russell
2670a2872e Remove s-i-http Test Dependency from s-i-amqp
No longer needed.
2017-06-07 14:18:51 -04:00
Artem Bilan
bd53d8a1e0 SCSt-913: Fix AMQP Inbound Retry logic
Relates to spring-cloud/spring-cloud-stream#913
and 914094e51d

Also see https://github.com/spring-projects/spring-integration-kafka/pull/163

The `RetryTemplate` and `errorChannel` are mutually exclusive options:
```
Assert.state(getErrorChannel() == null, "Cannot have an 'errorChannel' property when a 'RetryTemplate' is "
	+ "provided; use an 'ErrorMessageSendingRecoverer' in the 'recoveryCallback' property to "
	+ "send an error message when retries are exhausted");
```
Therefore we don't have any error handling functionality if there is a retry but no `RecoveryCallback`.
So, don't add `RetryContext` to `ThreadLocal<AttributeAccessor>` if we don't have `RecoveryCallback` provided,
because that value is out of use then.

To make code more logical perform `attributesHolder.remove()` only for the non-retryable branch.
With that refactoring the missed `attributesHolder.remove()` has been observed in the `AmqpInboundGateway`
Add `attributesHolder.remove()` to the `RetryListener.close()` for retryable branch

**Cherry-pick to 4.3.x**
2017-06-07 12:09:52 -04:00
Marius Bogoevici
ecc3006179 INT-4288: Add blacklist headers at runtime
JIRA: https://jira.spring.io/browse/INT-4288

- Add `AbstractMessageProducingHandler.addNotPropagatedHeaders()`
so that new headers can be added without overriding existing ones.
- Add `AbstractMessageProducingHandler.getNotPropagatedHeaders()`
so that existing excluded headers can be consulted.

* Polishing JavaDocs and imports order

**Cherry-pick to 4.3.x**
2017-06-06 16:43:18 -04:00
Gary Russell
f58106ec3c INT-4033: Support SpEL in Gateway Timeouts
JIRA: https://jira.spring.io/browse/INT-4033

Provide a mechanism to support dynamic timeouts when invoking gateway methods.

Polishing - PR Comments

* Polishing `what's new`
* Add `STOMP` to the `endpoint-summary.adoc`
* Polishing code style a bit for the changes in this fix
2017-06-06 10:56:59 -04:00
Gary Russell
914094e51d INT-4256: AMQP: Conversion Errors to ErrorChannel
JIRA: https://jira.spring.io/browse/INT-4256

Also fix the JMS endpoint to use the `MessagingTemplate` instead of sending to the
error channel directly (ignored the send result).

Missing commit

Polishing - PR Comments

* Some additional polishing: remove extra `ifs`; make internal
classes `protected` for possible inheritors

Conflicts:
	spring-integration-amqp/src/main/java/org/springframework/integration/amqp/inbound/AmqpInboundChannelAdapter.java
	spring-integration-amqp/src/main/java/org/springframework/integration/amqp/inbound/AmqpInboundGateway.java

AMQP: Add Support for SCSt Error Handling

See: https://github.com/spring-cloud/spring-cloud-stream/issues/913

Add retry within `onMessage` so we have access to the converted message
as well as the original spring-amqp message, which is added to the
`ErrorMessage` as a header.

Similar to the work in spring-integration-kafka.

* Polishing JavaDocs
* Rename `AmqpMessageHeaderErrorMessageStrategy.AMQP_RAW_DATA`
to `AmqpMessageHeaderErrorMessageStrategy.AMQP_MESSAGE`

Conflicts:
	spring-integration-amqp/src/main/java/org/springframework/integration/amqp/inbound/AmqpInboundChannelAdapter.java
	spring-integration-amqp/src/main/java/org/springframework/integration/amqp/inbound/AmqpInboundGateway.java
	spring-integration-amqp/src/test/java/org/springframework/integration/amqp/inbound/InboundEndpointTests.java

* Use `AmqpHeaders.RAW_MESSAGE` as a retry context key
* Simple polishing for Java 8 code style
2017-06-06 09:48:14 -04:00
Gary Russell
b1f74577db AMQP: Use ErrorMessageStrategy
Fix a couple of places where `ErrorMessage` was created directly instead
of delegating to the configured `ErrorMessageStrategy`.
2017-06-05 14:57:35 -04:00
Gary Russell
cb444d8f5d INT-4284: Integration Properties @Bean => static
JIRA: https://jira.spring.io/browse/INT-4284

Prevent early instantiation of config.
2017-06-05 14:49:37 -04:00
Artem Bilan
33e9ce912f INT-4284: INFO about overriding readOnly headers
JIRA: https://jira.spring.io/browse/INT-4284

Add `INFO` into the `MessageBuilder#copyHeadersIfAbsent()` when end-user
tries to populate headers which are `readOnly`

We can't throw exception on the matter since can modify `readOnlyHeaders`
and that would force end-user to add `header-filter` logic to the application.

* Document `readOnly` headers in the `message.adoc`

**Cherry-pick 4.3.x**
2017-06-05 12:53:21 -04:00
Gary Russell
2c7bf9271c INT-4283: MarkerFilePresentFileListFilters
JIRA: https://jira.spring.io/browse/INT-4283

Filter that only passes files where a corresponding "marker" file is also present.

Implementations for file and(S)FTP.

* Polishing - PR Comments

* Missed one
2017-06-02 19:31:05 -04:00
Gary Russell
c3031a2c7c INT-4285: TCP: Add Elastic Raw Deserializer
JIRA: https://jira.spring.io/browse/INT-4285

Buffer grows as needed.
2017-06-02 17:37:45 -04:00
Artem Bilan
a7ad22adcf ReactiveStreamsTests: Add Reactor diagnostics
https://build.spring.io/browse/INT-FATS5IC-186
2017-06-01 14:35:59 -04:00
Gary Russell
0d28e8c5e3 Revert "Ignore Test (temporary)"
This reverts commit a800d9683a.
2017-06-01 11:16:32 -04:00
Artem Bilan
f112ecbb7e INT-4269: Add Stream & Flux Support for Splitter
JIRA: https://jira.spring.io/browse/INT-4269

* Check if `outputChannel` is `ReactiveStreamsSubscribableChannel`
to let back-pressure splitting
* Build `Flux` or `Iterator` depending in the `reactive` state
* Allow to get a size of the `iterator` if it is possible,
for example `XPathMessageSplitter`

Add tests

Fix raw type and unused import

* Add JavaDocs to the `AbstractMessageSplitter#obtainSizeIfPossible()`
* Add asserts for the `sequenceSize` populataiton in the `XPathMessageSplitter`
* Document `Stream` & `Flux` support in the splitter

Minor doc polishing
2017-05-31 14:28:28 -04:00
Gary Russell
a800d9683a Ignore Test (temporary) 2017-05-31 12:21:46 -04:00
Gary Russell
492246eb13 Fix NPE (Mock Message with no Headers) 2017-05-31 12:10:27 -04:00
Gary Russell
d90d4e4d8f INT-4283: Restore Registration of Missing Comps
JIRA: https://jira.spring.io/browse/INT-4282

Unrecognized components were not added to `targetIntegrationComponents` causing
problems such as messge-driven components not starting.
2017-05-30 11:10:26 -04:00
Artem Bilan
bb2ee967f2 INT-4002: JDBC MS Doc: DB init in the beginning
JIRA https://jira.spring.io/browse/INT-4002

To avoid some confuses during developing target applications,
warn end-users that it is important to initialize data base before
running applications with JDBC Message Stores
2017-05-25 15:58:57 -04:00
Artem Bilan
533fa17f76 Fix Checkstyle violation in the DelayHandlerTests 2017-05-25 14:46:44 -04:00
Artem Bilan
0379565264 Fix JavaDocs for Remote File components
https://build.spring.io/browse/INT-MASTER-684/
2017-05-25 14:34:29 -04:00
Gary Russell
be336a0463 Make DelayHandlerTests More Robust
https://build.spring.io/browse/INT-MASTER-683/

Wait for release task to arrive in the scheduler queue.
2017-05-25 14:04:25 -04:00