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
* spring-projectsGH-3902: Add Kotlin Coroutines Support
Fixesspring-projects#3902
* Add `isAsync()` propagation from the `MessagingMethodInvokerHelper`
to the `AbstractMessageProducingHandler` to set into its `async` property.
The logic is based on a `CompletableFuture`, `Publisher` or Kotlin `suspend`
return types of the POJO method
* Introduce `IntegrationMessageHandlerMethodFactory` and `IntegrationInvocableHandlerMethod`
to extend the logic to newly introduced `ContinuationHandlerMethodArgumentResolver`
and call for Kotlin suspend functions.
* Remove `MessageHandlerMethodFactoryCreatingFactoryBean` since its logic now is covered with the
`IntegrationMessageHandlerMethodFactory`
* Kotlin suspend functions are essentially reactive, so use `CoroutinesUtils.invokeSuspendingFunction()`
and existing logic in the `AbstractMessageProducingHandler` to deal with `Publisher` reply
* Fix `GroovySplitterTests` for the current code base
* Add `kotlinx.coroutines.flow.Flow` support
The `Flow` is essentially a multi-value reactive `Publisher`,
so use `ReactiveAdapterRegistry` to convert any custom reactive streams result to `Flux` and `Mono`
which we already support as reply types
* Add docs for `Kotlin Coroutines`
Rearrange the doc a bit extracting Kotlin support to individual `kotlin-functions.adoc` file
* Fix missed link to `reactive-streams.adoc` from the `index-single.adoc`
* Fix unintended Javadocs formatting in the `AbstractMessageProducingHandler`
* Add suspend functions support for Messaging Gateway
* Add convenient `CoroutinesUtils` for Coroutines types and `Continuation` argument fulfilling via `Mono`
* Treat `suspend fun` in the `GatewayProxyFactoryBean` as a `Mono` return
* Convert `Mono` to the `Continuation` resuming in the end of gateway call
* Document `suspend fun` for `@MessagingGateway`
* * Make `async` implicitly only for `suspend fun`
* * Remove unused imports
* * Verify sync and async `Flow` processing
* Mention default sync behavior in the docs
* * Improve reflection in the `CoroutinesUtils`
* Fix language in docs
Co-authored-by: Gary Russell <[email protected]>
* * Rebase and revert blank lines around `include` in docs
Co-authored-by: Gary Russell <[email protected]>
Copy file name to clipboardexpand all lines: spring-integration-core/src/main/java/org/springframework/integration/config/DefaultConfiguringBeanFactoryPostProcessor.java
Copy file name to clipboardexpand all lines: spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayMethodInboundMessageMapper.java
Copy file name to clipboardexpand all lines: spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java
Copy file name to clipboardexpand all lines: spring-integration-core/src/main/java/org/springframework/integration/handler/AbstractMessageProducingHandler.java
Copy file name to clipboardexpand all lines: spring-integration-core/src/main/java/org/springframework/integration/handler/MethodInvokingMessageProcessor.java
0 commit comments