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.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…