Closed
Description
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?