Commit Graph

10481 Commits

Author SHA1 Message Date
Artem Bilan
af5bcdf4d7 Honor Emission result in FluxMessageChannel
* Implement `Emission` handling in the `FluxMessageChannel` and `IntegrationReactiveUtils`
* Upgrade to Spring Kafka `2.6.0`
* Fix R2DBC components for deprecation in the Spring Data R2DBC
* Implement `StatementMapper.SelectSpec` for query expression
* Clean up for some sporadic test failures
2020-09-09 12:16:00 -04:00
Artem Bilan
e4b8b32b01 Upgrade to RSocket SNAPSHOT 2020-09-08 10:25:20 -04:00
Artem Bilan
342f8e8773 Revert to Sonar plugin 2.8 to show coverage 2020-08-28 16:04:55 -04:00
Artem Bilan
3c53a53b06 Fix Redis test to not initialize connection twice
Possible cause for: https://build.spring.io/browse/INT-MASTERSPRING40-1181
2020-08-27 10:53:18 -04:00
Artem Bilan
e5d859f1c7 Refinement for Redis Stream tests 2020-08-26 14:07:38 -04:00
Artem Bilan
52070259b3 Fix compatibility with the latest SF 2020-08-26 12:43:47 -04:00
Sergei Portnov
d95c7149c4 Fix typo in ftp.adoc 2020-08-25 11:29:21 -04:00
Michel Jung
6780bbd5c8 GH-3367: Separate timeouts in BarrierMH
Fixes https://github.com/spring-projects/spring-integration/issues/3367

Introduce a `requestTimeout` and `triggerTimeout` for `BarrierMessageHandler`
For instance, if an HTTP request sends a message to the barrier,
it should time out after 1min if no trigger message is received.
If the trigger message then arrives late and the HTTP request is no longer waiting,
it shouldn't wait for 1min before discarding the request but do so immediately.
2020-08-21 12:50:45 -04:00
Artem Bilan
3fb6567a1f Fix new Sonar smells 2020-08-21 11:37:43 -04:00
Artem Bilan
973276fc0a Fix count and update in MongoDb stores
* The `into()` query can't infer the type for entity if we provide `Object.class`
* The `updateFirst()` does not support sort queries any more - replace with `findAndModify()`
* Add `getMessageGroupCount()` into tests

**Cherry-pick to 5.3.x & 5.2.x**
2020-08-20 16:44:03 -04:00
Artem Bilan
750d721437 Fix some Sonar smells 2020-08-20 16:08:18 -04:00
Artem Bilan
8398d9c7e7 Upgrade to Kotlin 1.4 2020-08-19 16:38:32 -04:00
Artem Bilan
a2e70d2c78 Move back to SNAPSHOTs; fix for Reactor changes 2020-08-19 10:20:44 -04:00
Artem Bilan
f45206a013 Fix race condition in the MessageDrivenAdapterTests
The `pause` variable is set in the container already after a `consumer.pause()` call.
Therefore it's state might not be changed after acquiring the latch from the mock answer
2020-08-18 11:17:41 -04:00
Duy Dao
4c11a61c99 Fix JavaDoc of JmsInboundGatewaySpec
Probably a copy/paste error
2020-08-15 14:11:35 -04:00
Spring Buildmaster
1bb58c9193 [artifactory-release] Next development version 2020-08-12 17:48:31 +00:00
Spring Buildmaster
32d72f088b [artifactory-release] Release version 5.4.0-M2 2020-08-12 17:48:26 +00:00
Artem Bilan
21df969198 Upgrade to SK 2.6.0-M1; prepare for release 2020-08-12 13:18:21 -04:00
Artem Bilan
5c2af845d5 Simplify complexity in ZeroMqChannel constructor
* Upgrade to Spring AMQP `2.3.0-M2`
2020-08-12 11:35:16 -04:00
Artem Bilan
77936b9251 Add zeromq.adoc to index files
* Fix Sonar smells for new ZeroMQ components
* Upgrade to Spring Data `2020.0.0-M2`
2020-08-12 11:09:32 -04:00
Artem Bilan
269e9846a3 Upgrade dependencies to the latest milestones 2020-08-11 16:14:53 -04:00
Artem Bilan
a76bb24965 INT-3045: Add ZeroMqChannel support (#3355)
* INT-3045: Add `ZeroMqChannel` support

JIRA: https://jira.spring.io/browse/INT-3045

Provide a `SubscribableChannel` implementation for ZeroMQ

The general idea is to let to have a distributed channel implementation
where every client can connect to a single server backed by the channel.

The logic in the channel is fully transparent for end-user and there is just
enough to send message to it and subscribe for receiving on the other side.
If PUB/SUB model is used, all the subscribes (even over the network) going to
receive the same published message.
In case of PUSH/PULL only one subscriber in the whole cluster is going to get
the published message

* Use Reactor for better threading control
* JeroMQ is not interruptible-friendly: use control sockets to stop proxy loop
* Name Reactor's schedulers to avoid daemon threads

* * Use try-catch-with-resource to close sockets automatically
* Fix Checkstyle violations
* Use `Mono.handle()` to receive data from the socket

* * Optimize local for just a couple of PAIR sockets
* Implement TCP binding
* Add PUB/SUB tests

* * Fix subscriber scheduler name
* Optimize socket create logic
* Add PUSH/PULL over TCP test

* * Fix subscriber scheduler name
* Optimize socket create logic
* Add PUSH/PULL over TCP test
* Implement PUB/SUB over TCP

* * Introduce `ZeroMqProxy` - Spring-friendly component to configure and manage ZeroMq proxy
* Use this `ZeroMqProxy` logic as an external component for `ZeroMqChannel` testing

* * Fix Checkstyle
* Apply docs polishing
* Expose a capture socket on the proxy
* Implement `DisposableBean` in the `ZeroMqProxy` to destroy an internal executor service
* Add JavaDocs to `ZeroMqChannel`
* Add one more `ZeroMqChannel` to TCP test to be sure that proxy distribution works well

* * Add `hamcrest-core` dependency for Awatility

* * Add more JavaDocs to `ZeroMqProxy` and `ZeroMqChannel`
* Expose `ZeroMqChannel.setZeroMqProxy()` option for easier
configuration within the same application context
* Make `ZeroMqChannel` sockets configuration and connection
dependant on provided `ZeroMqProxy` (if any)
* Add `Consumer<ZMQ.Socket>` configuration callbacks to the `ZeroMqChannel`
* Expose `ZeroMqChannel.consumeDelay` option

* * Add docs for ZeroMQ
* Some additions into a `reactive-streams.adoc`
* Fix typo in the `xmpp.adoc`

* * Add `optional` `jackson-databind` since `ZeroMqChannel` uses it by default
* More words into docs

* * Fix language in docs according review

* Fix language in docs according review

Co-authored-by: Gary Russell <grussell@vmware.com>

* Apply suggestions from code review

Co-authored-by: Oliver <oli-ver@users.noreply.github.com>

* * Fix threading using a `publishOn()` for specific scheduler after `cache()`

* * Remove unused import

* * Change proxy port check from static `Mono.just()` to `Mono.fromCallable()`
to really evaluate the current port state on every repeat
* Add finite `100` repeat number to avoid infinite blocking when proxy is not started at all
* Add `doOnError()` for proxy `Mono` to log `ERROR` when repeat is exhausted

* * Fix Checkstyle violation

Co-authored-by: Gary Russell <grussell@vmware.com>
Co-authored-by: Oliver <oli-ver@users.noreply.github.com>
2020-08-11 15:04:02 -04:00
Artem Bilan
217e43b194 Add NOSONAR to IntReactiveUtils#emitNext() loop 2020-08-11 09:54:34 -04:00
Attoumane
3cb13af813 More tests for Redis Stream support
Related to https://github.com/spring-projects/spring-integration/issues/3226
2020-08-11 09:30:09 -04:00
Artem Bilan
60f3273bb1 Add diagnostics into StompServerIntegrationTests
Add `n` number for iteration to avoid infinity wait
2020-08-10 14:57:48 -04:00
Artem Bilan
a10e317696 Fix unused import
* Fix new Sonar smells
2020-08-10 14:39:26 -04:00
rohanmukesh12
b54085c99d INT-4566: UPDATE for R2DBC In Channel Adapter
JIRA: https://jira.spring.io/browse/INT-4566

* Rework UPDATE logic according deprecations
* Use `ColumnMapRowMapper` for default `Map` payload type
* Clean up tests
2020-08-10 14:12:28 -04:00
Artem Bilan
17fc4eae99 Fix IntReactiveUtils for the proper emission
* Enable `MessageChannelReactiveUtilsTests.testOverproducingWithSubscribableChannel()` back
* Disable `StompServerIntegrationTests` again since build on CI is stalled again
2020-08-10 12:32:47 -04:00
Artem Bilan
d14c5d5841 Fix Checkstyle violation 2020-08-10 12:10:25 -04:00
Artem Bilan
a180ca8c5f MessagingGW: replace MonoProcessor with Sinks.One
The `MonoProcessor.create()` is deprecated in the Reactor in favor of `Sinks.one()`
2020-08-10 11:58:34 -04:00
Gary Russell
0bae11c60e GH-3359: Add Timer to MessagingGatewaySupport
Resolves https://github.com/spring-projects/spring-integration/issues/3359

- replace removed simple counter with a `Timer`
- register DSL GPFB as beans so they can be discovered for wiring metrics

* Apply suggestions from code review
* Remove left over deprecation suppression
* Fix import
2020-08-10 10:46:41 -04:00
Artem Bilan
fcf7f761a5 Enable STOMP test back to check the solution
* Remove more `ManageableSmartLifecycle` from non-channel adapter components
2020-08-09 08:11:15 -04:00
Artem Bilan
8e5bd4cc80 Disable STOMP test until the fix reactor-netty 2020-08-08 14:28:30 -04:00
Artem Bilan
da7fc4d812 Fix STOMP integration test to close stompClient
The `ReactorNettyTcpStompClient` is based on the `ReactorNettyTcpClient`
which uses a `Schedulers.newParallel()` which has to be shut downed in the end
* Migrate all the STOMP tests to JUnit 5
2020-08-08 14:12:54 -04:00
Oliver
5e74c9c82d Update local maven install in Readme.md
The task `install` does not exist, `./gradlew publishToMavenLocal` needs to be used instead
2020-08-08 13:39:09 -04:00
Artem Bilan
f9fe988556 Downgrade Lettuce version to 5.3.2 2020-08-08 13:38:37 -04:00
Artem Bilan
a49a8848cb Revert some dependencies to be sure in build 2020-08-08 13:05:03 -04:00
Artem Bilan
9d557426b5 * Fix new Sonar smells
* Remove redundant `@SuppressWarnings("deprecation")`
* Add `Duration.ofSeconds(10)` to `StepVerifier.verify()`
to avoid infinite wait and lose failing text context on the hang CI build
2020-08-08 12:29:24 -04:00
Artem Bilan
65ad76232e Fix Checkstyle issues; upgrade some dependencies 2020-08-07 16:40:49 -04:00
Gary Russell
3de0445aaa GH-3358: Kafka IB Gateway - implement Pausable
Resolves https://github.com/spring-projects/spring-integration/issues/3358

Also add `isPaused()` to `Pausable`.

* Fix `@since` to the proper version
2020-08-07 15:26:57 -04:00
Attoumane Ahamadi
4ae6b52c00 GH-3226: Add ReactiveRedisStreamMessageProducer
Fixes https://github.com/spring-projects/spring-integration/issues/3226

* Implement a `ReactiveRedisStreamMessageProducer` to consume Redis streams
* Add support for consumer groups and group auto-creation
* Add `@author` to `RedisHeaders`
* Rename test methods in the `ReactiveRedisStreamMessageHandlerTests` to project code style
* Implement `hashCode()` & `equals()` for `Person` & `Address` testing models
* Fix `ReactiveRedisStreamMessageProducerTests` not creating bean for `ConnectionFactory`.
Otherwise it caused to create one more not controlled `RedisClient`
* Code style clean up in the `ReactiveRedisStreamMessageProducer`
* Implement a group creation logic as a reactive stream deferring the call until
a subscription happens on the final `messageFlux`
* Move a common code for message building as the last `map()` operator in the final `Flux`
* Remove an `IntegrationFlow` definition in the `ReactiveRedisStreamMessageProducerTests`
as redundant
2020-08-07 15:23:20 -04:00
Gary Russell
43950d16ae Restore and deprecate @IntManConf properties 2020-08-07 13:40:57 -04:00
Gary Russell
1beb854fb4 Remove Legacy Metrics
- Simplify MBeans - instead of wrapping to expose lifecycle methods,
  implement `ManageableLifecycle`. Register an additional MBean for
  polled endpoints to control the lifecycle.

* Polishing

- Move `QueueChannel` `@ManagedAttribute`s to `QueueChannelOperations`
- Make all `AbstractEndpoints` `IntegrationManagedResource`s and remove `ManagedEndpoint`
  to allow exposure of any `@Managed*` methods (including those on `Pausable`)
- Revert to `Lifecycle` for classes that are not related to endpoints
- Remove legacy metrics from docs
2020-08-07 12:56:57 -04:00
Gary Russell
da5d002d64 AMQP: Batch mode option to receive element headers
In preparation for https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/290

SCSt is not set up to receive a `Message<Message<?>>`.

Similar to the kafka endpoint, add the batched headers in a header.
2020-08-06 20:39:56 -04:00
Artem Bilan
094eb2e021 Fix new Sonar smells 2020-08-06 10:45:44 -04:00
Artem Bilan
9989344c0b Remove usage of removed SF deprecated classes
Related to https://github.com/spring-projects/spring-framework/issues/25548
2020-08-06 10:21:15 -04:00
Artem Bilan
cd63763bb4 Fix compatibility with Reactor & Spring Data 2020-08-05 15:33:24 -04:00
Gary Russell
acdc25a172 Upgrade to spring-kafka 2.6.0 2020-08-04 12:14:16 -04:00
Gary Russell
0e2652fdf6 More Cron test fixes 2020-08-03 16:51:55 -04:00
Gary Russell
2356324e9b Fix for internal changes to CronTrigger 2020-08-03 16:30:27 -04:00