When I use MessageListenerAdapter to handle message, I could call SimpleMessageListenerContainer.stop() to stop consume from the queue. But after I change to use @RabbitListener to listen, I can't find a method like this. I tried CachingConnectionFactory.stop() but doesn't work. Could anyone help? Thank you very much.
@RabbitListener
an id
.stop()
on the registry will stop all containers.getListenerContainer(id).stop()
to stop an individual container.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With