Skip to content
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

Reactor Netty resources created by the auto-configured WebClient may outlive the application context #14058

Closed
wilkinsona opened this issue Aug 14, 2018 · 2 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@wilkinsona
Copy link
Member

We should hopefully be able to use a ReactorResourceFactory bean and a custom ReactorClientHttpConnector to tie the lifecycle of the resources to the application context. See SPR-16963 for some background information.

@wilkinsona wilkinsona added the type: bug A general bug label Aug 14, 2018
@wilkinsona wilkinsona added this to the Backlog milestone Aug 14, 2018
@rstoyanchev
Copy link
Contributor

rstoyanchev commented Aug 14, 2018

I've updated the docs.

The WebFlux starter can still rely on global resources, I think. It's the idiomatic way with Reactor Netty and will work better alongside other libraries that embed Reactor Netty. Perhaps declare ReactorResourceFactory as a bean with globalResources=true just in case. Can the application context be closed and re-recreated in the same process? There is the devtools case based on #9146, and perhaps declaring the factory could be used to clean that up a bit.

For Spring MVC, similar reasoning. Clearly when running in a WAR with the SpringBootServletInitializer, the ReactorResourceFactory in global mode is needed, but that should also be sufficient.

@rstoyanchev
Copy link
Contributor

A couple of data points. The CF Java client manages its own resources. The RabbitMQ HTTP management client doesn't do anything special for resources, and hence participates in global resources by default.

I've also created a related issue reactor/reactor-netty#416.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants