Skip to content

RabbitListenerEndpointRegistry removal of listeners support #796

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

Closed
dpzx opened this issue Aug 22, 2018 · 2 comments
Closed

RabbitListenerEndpointRegistry removal of listeners support #796

dpzx opened this issue Aug 22, 2018 · 2 comments

Comments

@dpzx
Copy link

dpzx commented Aug 22, 2018

There's no way to remove a listener container from the registry for garbage collection.
The method needs to be implemented or the member field "listenerContainers" should be changed to protected so people who needs this functionality can subclass and implement it themselves.

@garyrussell
Copy link
Contributor

Please explain your use case in more detail; it's not clear why you would want to dynamically remove the infrastructure for a statically defined @RabbitListener.

It's not as simple as just removing the container from the registry.

@dpzx
Copy link
Author

dpzx commented Aug 23, 2018

@garyrussell We have a distributed queue service application where we are using RabbitListenerEndpointRegistry to dynamically create MessageListenerContainer that exclusively consume from a queue on demand. Once there are no more messages to be process, we listen to the idle event and then shutdown the container and want to remove the reference to that container so that it can be eligible for garbage collection.

garyrussell added a commit to garyrussell/spring-amqp that referenced this issue Aug 23, 2018
Resolves spring-projects#796

Support removal of containers from the registry.

**cherry-pick to 2.0.x**
garyrussell added a commit to garyrussell/spring-amqp that referenced this issue Aug 23, 2018
Resolves spring-projects#796

Support removal of containers from the registry.

**cherry-pick to 2.0.x**
artembilan pushed a commit that referenced this issue Aug 27, 2018
Resolves #796

Support removal of containers from the registry.

**cherry-pick to 2.0.x**
artembilan pushed a commit that referenced this issue Aug 27, 2018
Resolves #796

Support removal of containers from the registry.

**cherry-pick to 2.0.x**

(cherry picked from commit 1ed2b12)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants