Skip to content

KafkaListenerEndpointRegistry - Support Unregister #2375

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
garyrussell opened this issue Aug 8, 2022 Discussed in #2374 · 0 comments · Fixed by #2376
Closed

KafkaListenerEndpointRegistry - Support Unregister #2375

garyrussell opened this issue Aug 8, 2022 Discussed in #2374 · 0 comments · Fixed by #2376

Comments

@garyrussell
Copy link
Contributor

Discussed in #2374

Originally posted by ambethell August 8, 2022
Being able to register listeners at runtime via the kafkaListenerEndpointRegistry is great. However when calling stop() and destroy() on MessageListenerContainer - this does not remove the bean from the kafkaListenerEndpointRegistry listenerContainers.

I cannot register, destroy - then re-register a container listener with the same ID without restarting the JVM. I receive an error 'Another endpoint is already registered with id' when calling kafkaListenerEndpointRegistry.registerListenerContainer.

Should I just not use the KafkaListenerEndpointRegistry if I want to dynamically register and unregister listeners at runtime?

@garyrussell garyrussell added this to the 3.0.0-M6 milestone Aug 8, 2022
@garyrussell garyrussell self-assigned this Aug 8, 2022
garyrussell added a commit to garyrussell/spring-kafka that referenced this issue Aug 9, 2022
Resolves spring-projects#2375

Also add docs for creating dynamic listener containers.

**cherry-pick to 2.9.x, 2.8.x**
garyrussell added a commit to garyrussell/spring-kafka that referenced this issue Aug 9, 2022
Resolves spring-projects#2375

Also add docs for creating dynamic listener containers.

**cherry-pick to 2.9.x, 2.8.x**
artembilan pushed a commit that referenced this issue Aug 9, 2022
Resolves #2375

Also add docs for creating dynamic listener containers.

**cherry-pick to 2.9.x, 2.8.x**
artembilan pushed a commit that referenced this issue Aug 9, 2022
Resolves #2375

Also add docs for creating dynamic listener containers.

**cherry-pick to 2.9.x, 2.8.x**
artembilan pushed a commit that referenced this issue Aug 9, 2022
Resolves #2375

Also add docs for creating dynamic listener containers.

**cherry-pick to 2.9.x, 2.8.x**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant