You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/reference/asciidoc/reactive-streams.adoc
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ NOTE: All the Reactive Streams interaction in Spring Integration implemented wit
32
32
=== Messaging Gateway
33
33
34
34
The simplest point of interaction with Reactive Streams is a `@MessagingGateway` where we just make a return type of the gateway method as a `Mono<?>` - and the whole integration flow behind a gateway method call is going to be performed when a subscription happens on the returned `Mono` instance.
35
-
See <./gateway.adoc#reactor-mono,Reactor `Mono`>> for more information.
35
+
See <<./gateway.adoc#reactor-mono,Reactor `Mono`>> for more information.
36
36
A similar `Mono`-reply approach is used in the framework internally for inbound gateways which are fully based on Reactive Streams compatible protocols (see <<reactive-channel-adapters>> below for more information).
37
37
The send-and-receive operation is wrapped into a `Mono.deffer()` with chaining a reply evaluation from the `replyChannel` header whenever it is available.
38
38
This way an inbound component for the particular reactive protocol (e.g. Netty) is going to be as a subscriber and initiator for a reactive flow performed on the Spring Integration.
@@ -47,7 +47,7 @@ With a standard imperative `MessageChannel` use-case, and if a reply payload is
47
47
A result of this, the `Mono` has to be subscribed explicitly downstream or flattened by the `FluxMessageChannel` downstream.
48
48
With a `ReactiveStreamsSubscribableChannel` for the `outputChannel`, there is no need to be concerned about return type and subscription; everything is processed smoothly by the framework internally.
49
49
50
-
See <./service-activator.adoc#async-service-activator,Asynchronous Service Activator>> for more information.
50
+
See <<./service-activator.adoc#async-service-activator,Asynchronous Service Activator>> for more information.
51
51
52
52
=== `FluxMessageChannel` and `ReactiveStreamsConsumer`
53
53
@@ -64,7 +64,7 @@ And thanks to a `ReactiveStreamsConsumer` implementation in between, the whole i
64
64
In this case, the flow behavior is changed from an imperative push model to a reactive pull model.
65
65
A `ReactiveStreamsConsumer` can also be used to turn any `MessageChannel` into a reactive source using `MessageChannelReactiveUtils`, making an integration flow partially reactive.
66
66
67
-
See <./channel.adoc#flux-message-channel,`FluxMessageChannel`>> for more information.
67
+
See <<./channel.adoc#flux-message-channel,`FluxMessageChannel`>> for more information.
68
68
69
69
=== Source Polling Channel Adapter
70
70
@@ -75,7 +75,7 @@ A `Flux.flatMapMany()` is used then to poll `maxMessagesPerPoll` and sink them i
75
75
This generator `Flux` is subscribed by the provided `ReactiveStreamsSubscribableChannel` honoring a back-pressure downstream.
76
76
This way, any `MessageSource` implementation can be turned into a reactive hot source.
77
77
78
-
See <./polling-consumer.adoc#polling-consumer,Polling Consumer>> for more information.
78
+
See <<./polling-consumer.adoc#polling-consumer,Polling Consumer>> for more information.
79
79
80
80
=== Splitter and Aggregator
81
81
@@ -90,7 +90,7 @@ The incoming messages are sunk into a `Flux.create()` initiated when a `FluxAggr
90
90
This `Flux` is subscribed to by a `ReactiveStreamsSubscribableChannel` on demand, or directly in the `FluxAggregatorMessageHandler.start()` when the `outputChannel` is not reactive.
91
91
This `MessageHandler` has its power, when the whole integration flow is built with a `FluxMessageChannel` before and after this component, making the whole logic back-pressure ready.
92
92
93
-
See <./splitter.adoc#split-stream-and-flux,Stream and Flux Splitting>> and <./aggregator.adoc#flux-aggregator,Flux Aggregator>> for more information.
93
+
See <<./splitter.adoc#split-stream-and-flux,Stream and Flux Splitting>> and <<./aggregator.adoc#flux-aggregator,Flux Aggregator>> for more information.
94
94
95
95
=== Java DSL
96
96
@@ -103,7 +103,7 @@ For the exact opposite use-case, when `IntegrationFlow` should call a reactive s
103
103
The flow at this point is turned into a `FluxMessageChannel` which is propagated into a provided `fluxFunction`, performed in the `Flux.transform()` operator.
104
104
A result of the function is wrapped into a `Mono<Message<?>>` for flat-mapping into an output `Flux` which is subscribed by another `FluxMessageChannel` for downstream flow.
105
105
106
-
See <./dsl.adoc#java-dsl,Java DSL Chapter>> for more information.
106
+
See <<./dsl.adoc#java-dsl,Java DSL Chapter>> for more information.
107
107
108
108
[[reactive-channel-adapters]]
109
109
=== Reactive Channel Adapters
@@ -120,7 +120,7 @@ A reactive outbound channel adapter implementation is about initiation (or conti
120
120
An inbound payload could be a reactive type per se or as an event of the whole integration flow which is a part of reactive stream on top.
121
121
A returned reactive type can be subscribed immediately if we are in one-way, fire-and-forget scenario, or it is propagated downstream (request-reply scenarios) for further integration flow or an explicit subscription in the target business logic, but still downstream preserving reactive streams semantics.
122
122
123
-
Currently Spring Integration provides channel adapter (or gateway) implementations for <./webflux.adoc#webflux,WebFlux>> and <./rsocket.adoc#rsocket,RSocket>>.
123
+
Currently Spring Integration provides channel adapter (or gateway) implementations for <<./webflux.adoc#webflux,WebFlux>> and <<./rsocket.adoc#rsocket,RSocket>>.
124
124
Also an https://github.com/spring-projects/spring-integration-extensions/tree/master/spring-integration-cassandra[Apache Cassandra Extension] provides a `MessageHandler` implementation for the Cassandra reactive driver.
125
125
More reactive channel adapters are coming, for example for https://r2dbc.io/[R2DBC], https://mongodb.github.io/mongo-java-driver-reactivestreams/[MongoDB], for Apache Kafka in https://github.com/spring-projects/spring-integration-kafka[Spring Integration Kafka] based on the `ReactiveKafkaProducerTemplate` and `ReactiveKafkaConsumerTemplate` from https://spring.io/projects/spring-kafka[Spring for Apache Kafka] etc.
126
126
For many other non-reactive channel adapters thread pools are recommended to avoid blocking during reactive stream processing.
0 commit comments