-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Add RSocketServiceMethod support for Kotlin suspending functions
#35473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add RSocketServiceMethod support for Kotlin suspending functions
#35473
Conversation
RSocketServiceMethod support for suspending functionsRSocketServiceMethod support for Kotlin suspending functions
|
@dmitrysulman hello, dear Dmitry. Can you please also add test cases for streaming? At least requestStream that return Flow. Because I also was doing poc of this feature (just for interest) and Flow return type most probably will be covered by ReactiveAdapterRegistry, but still it is good for it to also be covered by test. And also meanwhile I am not sure if the requestChannel will correctly handle Flow as argument, so also good to be covered with test. Will be very grateful if you have time to add it and thank you for your contribution. |
350082c to
255ef56
Compare
|
@doxlik done, Request Stream and Request Channel suspending functions (using The |
...saging/src/main/java/org/springframework/messaging/rsocket/service/RSocketServiceMethod.java
Outdated
Show resolved
Hide resolved
...test/kotlin/org/springframework/messaging/rsocket/service/RSocketServiceMethodKotlinTests.kt
Show resolved
Hide resolved
spring-aop/src/main/java/org/springframework/aop/framework/CoroutinesUtils.java
Outdated
Show resolved
Hide resolved
255ef56 to
49d92ce
Compare
See spring-projects#34868 Signed-off-by: Dmitry Sulman <[email protected]>
49d92ce to
4918592
Compare
See spring-projectsgh-35473 Signed-off-by: Dmitry Sulman <[email protected]>
See spring-projectsgh-35473 Signed-off-by: Dmitry Sulman <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good, will refine and merge.
This PR updates
RSocketServiceMethodto allow using the@RSocketExchangeannotation with Kotlin suspending functions when used as RSocket requester.Fixes #34868