-
Notifications
You must be signed in to change notification settings - Fork 36
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
Bug Report: Schedulers arent behaving as documented. #27
Labels
Comments
This is actually in a dependency Ill move it there JakeWharton/retrofit2-reactor-adapter#16 |
@spencergibb can you reopen this issue as jakes comment on the adapter whilst it is documented incorrect is the solution, however they arent going to fix it in the adapter as its designed for okhttp and works fine but you suffer from this bug due to using netty/webclient so will need to add support for publishOn. |
PRs welcome |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the documentation of ReactorCallAdapterFactory it states that if you provide a scheduler it will modify the outcome of the request to be executed on a thread managed by the scheduler provided by using publishOn.
I would assume this functionality is added to provide a way for users to get off the netty response thread quickly after returning from webclient where you may potentially do blocking work on the netty response thread downstream as documented on https://docs.spring.io/spring-framework/docs/current/reference/html/web-reactive.html#webflux-concurrency-model
However in the code it doesnt use publishOn it uses subscribeOn ReactoryCallAdapter which I believe does nothing except moves the subscription to the schedulers thread, than executes the request and afterwards leaves the response to be handled on the netty thread incorrectly.
I believe this should be using publishOn as documented to move the response handling to a thread controlled by the scheduler provided.
The text was updated successfully, but these errors were encountered: