Commit Graph

9723 Commits

Author SHA1 Message Date
Artem Bilan
71fbe29da4 Add Docs for Flux Aggregator
* Some test polishing
* Fix not properly wrapped code snippet in the `scripting.adoc`

Doc polishing
2019-06-14 11:32:55 -04:00
Gary Russell
2fb7554dcf Fix new tangle introduced by Control Bus changes
- tangle between `expression` and `endpoint`
- move `Pausable` to `core`
2019-06-14 11:17:34 -04:00
Gary Russell
173eca2963 Upgrade to Spring Data Moore RC1 2019-06-14 10:31:06 -04:00
Gary Russell
0b3421ce6d Upgrade rsocket to 0.12.2-RC4 2019-06-13 16:43:27 -04:00
Gary Russell
70c799f9dd Upgrade reactor milestones 2019-06-13 16:40:52 -04:00
Artem Bilan
1142caf092 Ignore JdbcLockRegLeaderInTests.testLostConnection
https://build.spring.io/browse/INT-MASTER-1584/

Looks like an embedded DBd is not fully cleared
if we don't close application context
2019-06-13 13:00:47 -04:00
Michael Wiles
360c74026a GH-2962: check the whole ctx hierarchy for nullChannel
Fixes https://github.com/spring-projects/spring-integration/issues/2962

* addressing code style removed comments and addressed review comments

**Cherry-pick to 5.1.x**
2019-06-13 11:59:44 -04:00
Artem Bilan
d85d6ee735 INT-3073: Add FluxAggregatorMessageHandler
JIRA: https://jira.spring.io/browse/INT-3073

Add `FluxAggregatorMessageHandlerTests`

* Add `FluxAggregatorMessageHandlerTests`
* Fix `FluxAggregatorMessageHandler` for the default `messageForWindowFlux`
to rely on the `publish().autoConnect()` to build a target `Flux` for
window and also copy headers from the first `Message` in the window.
Looks like `switchOnFirst()` doesn't work somehow with windows or I just
don't use it properly, although it isn't clear how to continue chain but
get the whole `Flux` as a single entry for message payload

* Add more tests for `FluxAggregatorMessageHandlerTests`
* Fix `AbstractMessageSplitter` to cast properly a primitive array

* Implement `Lifecycle` in the `FluxAggregatorMessageHandler`

* Add JavaDocs into the `FluxAggregatorMessageHandler`

Javadoc polishing
2019-06-13 11:13:09 -04:00
Amit Sadafule
45fe5be0cd GH-2956: Add MessageHandler.getMetricsCaptor()
Fixes https://github.com/spring-projects/spring-integration/issues/2956

* Add `getMetricsCaptor.getMetricsCaptor()` for possible customization in the target implementation
* Added dependancy for `@Nullable`

**Cherry-pick to 5.1.x**
2019-06-11 10:27:54 -04:00
Gary Russell
78a0ec74e7 GH-2958: Also Add to Common Header in AMHEMS
Resolves https://github.com/spring-projects/spring-integration/issues/2958

The previous commit added the raw source message to a common header
`IntegrationMessageHeaderAccessor.SOURCE_DATA` so that the spring-cloud-stream
can construct an error message containing the data when using functions.

However, we also need to add it to the common header when the `ErrorMessage`
is created by Spring Integration for the normal message channel binder.

This allows the DLQ processing to be agnostic as to who created the
error message.
2019-06-11 10:14:44 -04:00
Gary Russell
1067f91a8b AMQP: Add bindSourceMessage property (inbound)
Resolves https://github.com/spring-projects/spring-integration/issues/2958
2019-06-10 18:09:47 -04:00
Artem Bilan
0addbe536b Increase wait timeout in the JdbcLockLeaderTests
Looks like latest upgrades for the CI server made virtual machines a bit
slower (less resources are allocated), so we don't have a reasonable
time for switching between threads.
2019-06-10 14:10:54 -04:00
Artem Bilan
1c88ba19d7 Polishing for nohttp plugin
* Move the plugin and its task into the root project configuration
* Add more image file extensions to exclude
* Fix `sftp.adoc` do not use HTTP url for the JSCH library project page;
 use GitHub repo link instead
2019-06-10 13:59:30 -04:00
Gary Russell
703141b433 Reverse check/checkAsciidocLinks order 2019-06-05 15:16:51 -04:00
Gary Russell
8c68255050 Fix doc links; add checkAsciidocLinks to testAll 2019-06-05 14:51:10 -04:00
Gary Russell
466daa8774 TCP: Connect Timeout; Close Stream
- Add `connectTimeout` to client connection factories
- Add `closeStreamAfterSend` to outbound gateway

* Polishing - PR Comments.
2019-06-05 14:38:13 -04:00
Artem Bilan
cd075723e2 Fix new Sonar smells 2019-06-05 10:03:03 -04:00
Artem Bilan
5e7c1ae2e7 Add RSocket Java DSL
* Add `@NonNullApi` for RSocket packages
* Some code style and JavaDocs polishing
2019-06-04 13:50:32 -04:00
Artem Bilan
0c32a57e99 Fix Sonar smells for XML module 2019-05-31 10:44:36 -04:00
Gary Russell
7e0a5e90b4 Build: asciidoc link check improvement
- find all link errors before failing
2019-05-30 18:14:39 -04:00
Artem Bilan
315f0e711f Fix Sonar vulnerabilities for varargs
* Fix smell for static `AmqpInboundGateway.attributesHolder`

* Fix readOnlyHeaders in the `MessageBuilder`
2019-05-30 15:41:53 -04:00
Artem Bilan
1d08d3bdc2 Various Docs build fixes
https://build.spring.io/browse/INT-MASTER-1568/

* Fix `whats-new.adoc` for broken link
* remove `logDocuments = true` from the `build.gradle`
* Change the Gradle task name in the `.travis.yml` for consistency
2019-05-30 15:27:49 -04:00
Gary Russell
2a50a26252 Build: check external asciidoc links
* Check external links have a description

* Use Groovy regex instead of Java

* Add source file name to exception message

* Add 'checkAsciiDocLinks' to Travis build
2019-05-30 15:09:45 -04:00
Artem Bilan
374b4b70f1 GH-2880: Handle Pausable in Control Bus (#2940)
* GH-2880: Handle `Pausable` in Control Bus

Fixes https://github.com/spring-projects/spring-integration/issues/2880

* Refactor `ControlBusMethodFilter` to handle `Pausable` managed operations
* Optimize and internal `ControlBusMethodFilter.filter()` logic to rely
on the `MergedAnnotations`
* Modify `EnableIntegrationTests` to test new functionality and document
the feature

* * `ControlBusMethodFilter` to deal with plain `Lifecycle` impls as well
2019-05-30 14:10:00 -04:00
Artem Bilan
e9591c6fdf Make spring-ws-core optional for SI-xml
It turns out that `spring-ws-core` brings too much WS stuff which
triggers and auto-configuration to be enabled in Spring Boot app when
we don't expect it.

* The `UnmarshallingTransformer` is already aware of `MimeMessage` and
`MarshallingUtils` being optional, so just remove redundant `public`
modifier for `maybeUnmarshalMimeMessage()` method
* Load `ServletContextResource` class in the `XsltPayloadTransformer`
on demand making such a dependency as optional
2019-05-30 14:08:15 -04:00
Gary Russell
a9a2fccf1f Add @MongoDbAvailable to new test 2019-05-30 10:53:16 -04:00
Artem Bilan
34db267a8a GH-2936: Add custom converters for MongoDbMS
Fixes https://github.com/spring-projects/spring-integration/issues/2936

* Add `MongoDbMessageStore.setCustomConverters()` to allow to inject
any custom converters for `payload` as well as header values

**Cherry-pick to 5.1.x**
2019-05-30 10:36:37 -04:00
Gary Russell
d2d09cd8d8 Upgrade Jackson 2019-05-30 09:39:21 -04:00
Artem Bilan
65c884cec7 Enable nohttp Gradle plugin
* Add `io.spring.nohttp` Gradle plugin into the build script and allow
it only on CI server, since it is going to parse every file
* Fix tests do not use `http` any more
* Fix `test.html` in the `mail` modules tests to exclude a Namespace for
OExchange XRD protocol
* Fix some files for new line in the end of file according Checkstyle
violations
2019-05-30 09:32:26 -04:00
Gary Russell
9fa9d1b3d0 Add Multi-Page HTML Reference
- to avoid having to load the whole document
- provide a link to the single page version for browser search

* Fix cross-document links.

Links need to be qualified with the containing file name for the
multi-page html doc.
2019-05-29 17:47:34 -04:00
Gary Russell
d7fa60922b Fix Broken Links in Reference 2019-05-29 16:24:46 -04:00
Gary Russell
8ce16b99d2 Test for GH-2938
Close connection in `TcpNioConnection.testInsufficientThreads()`.
Before the fix, this would block for 15 seconds, causing the assert
on the future completion to fail.
2019-05-28 16:25:31 -04:00
谢鑫
796a0c43d2 Fix TimeUnit in ChannelInputStream.close()
The `TcpNioConnection.ChannelInputStream.close()` uses wrongly `TimeUnit.SECONDS`
for the `pipeTimeout` in the `this.buffers.offer()` call.

* The `TimeUnit.MILLISECONDS` must be used instead

**Cherry-pick to 5.1.x, 5.0.x, 4.3.x**
2019-05-28 14:36:10 -04:00
Andreas Gebhardt
400f9e1026 fixed misaligned source code snippet in JMS documentation 2019-05-28 13:10:58 -04:00
Artem Bilan
d713825740 Get an OS-assigned port in RmiOutboundGatewayTests
https://build.spring.io/browse/INT-MASTER-1531

It's hard to fix all other tests without core components modification.
Although it doesn't look like worth it.
We may consider just `@Ignore` those tests since RMI is not so popular
these days for the thorough support
2019-05-21 14:13:57 -04:00
Artem Bilan
6bcf71c863 Fix Sonar smell in the RSocketInboundGatewayParser 2019-05-18 09:13:05 -04:00
Artem Bilan
bc9aa83aea RSocket XML Config support 2019-05-17 11:45:03 -04:00
Florian Schöffl
87169bc77a HTTP Outobund: Call encode() for URIs
* Encoding in AbstractHttpRequestExecutingMessageHandler.java is now done when flag is set

* Added test for URI Encoding

* Fixed checkstyle violations

**Cherry-pick to 5.1.x**
2019-05-16 13:50:02 -04:00
Gary Russell
9f53b80e18 GH-2931: AMQP De-Batching as List<?> Payload
Resolves https://github.com/spring-projects/spring-integration/issues/2931
2019-05-14 16:00:59 -04:00
Artem Bilan
e05b6f75f4 Fix some typos in the whats-new.adoc & ip.adoc 2019-05-13 16:27:02 -04:00
Spring Buildmaster
b976ce2240 [artifactory-release] Next development version 2019-05-13 17:15:35 +00:00
Spring Buildmaster
972e84353b [artifactory-release] Release version 5.2.0.M2 2019-05-13 17:15:31 +00:00
Artem Bilan
3b57713c1f Upgrade dependencies, Gradle; prepare for release
* Fix Checkstyle violations according the latest update
2019-05-13 12:35:16 -04:00
Gary Russell
cea47f7904 Upgrade versions for 5.2.0.M2 2019-05-13 10:36:18 -04:00
Artem Bilan
30750f53b7 Polishing for RSocket channel adapter (#2928)
* Polishing for RSocket channel adapter

* Add JavaDocs
* Remove unused code

* * Fix Sonar smells
2019-05-12 11:25:59 -04:00
Artem Bilan
a56116fc15 Fix package tangle in CacheRequestHandlerAdvice 2019-05-10 17:44:24 -04:00
Artem Bilan
36e7041c26 Add RSocketInboundGateway; refactoring (#2923)
* Add `RSocketInboundGateway`; refactoring

* Extract an `AbstractRSocketConnector` for common client and server connectors logic
* Introduce an `IntegrationRSocketAcceptor` and `IntegrationRSocket` for the
mapping and handling logic of RSockets and messages in between
* Introduce an `IntegrationRSocketEndpoint` marker interface for Inbound Gateway mappings
* Add `RSocketInboundGateway` implementation, which is called from the
`IntegrationRSocketAcceptor` by the `IntegrationRSocketEndpoint` mapping
* Add `RSocketConnectedEvent` to emit when the client is connected to the server.
It does not make sense in Spring Integration to delegate such a logic into the
`RSocketInboundGateway`

* * Add `ServerRSocketConnector` to represent an RSocket server and
container for connected `RSocketRequester`s from clients
* Extract `accept(ConnectionSetupPayload setupPayload, RSocket sendingRSocket)`
server logic into an internal `ServerRSocketAcceptor` extension for the
`IntegrationRSocketAcceptor`
* Address PR comments:
 - `RSocketConnectedEvent.toString()`
 - `ApplicationEventPublisherAware` into the `ServerRSocketConnector`
 - Log RSocket connection if no `this.applicationEventPublisher`
* Remove `handleConnectionSetupPayload()` from the `IntegrationRSocket`
since it is not delegated to the target handler
* Provide reasonable default `RSocketStrategies` for the
`AbstractRSocketConnector` and `RSocketInboundGateway`
* Add initial `RSocketInboundGatewayIntegrationTests`

* * Don't use `BytyBuffer` in the `RSocketConnectedEvent.toString()`
* Always `payload.retain()` when we convert `Payload` to `DataBuffer`
* Fix `IntegrationRSocketAcceptor.detectEndpoints()` stream logic
to really iterate over all the `IntegrationRSocketEndpoint` beans
* Fix test to use an explicit `ClientConfig` class for the
`@SpringJUnitConfig`: looks like JUnit 5 is OK to scan for `package
protected` classes as well
* Add request/reply tests into the `RSocketInboundGatewayIntegrationTests`
for both server and client sides

* * Remove `DataBuffer` from `RSocketConnectedEvent.toString()`

* * Fix Checkstyle violation in the RSocketInboundGatewayIntegrationTests
2019-05-10 17:20:19 -04:00
Artem Bilan
4b58bf0ee5 Fix AMQP module according latest Spring AMQP 2019-05-10 13:40:50 -04:00
Gary Russell
06140cb7ad SFTP: Add channelConnectTimeout
While investigating an SI build failure, I noticed that there is
a timeout available for when connecting channels.

This won't resolve the build issue (where the session closed) but
worth adding as a property.
2019-05-09 12:44:13 -04:00
Gary Russell
bcff9d4089 Fix unused import 2019-05-09 09:36:23 -04:00