-1

I have integrated rabbitmq in a spring application.In my application i am doing indexing on solr using rabbit mq.

On my every queue i have set only one listner.

I want to stop the listner on message progess.But the problem is that when i am going to stop the listner by registry.stop the rabbit mq ui and logs showing that the listner is stopped. but the message on which it works sucessfully index on solr.

As per my knowledge after killing the listner, the message also not going to further process.

1 Answers1

1

That's not correct. It just stops to consume more messages from the queue. Currently in-flight messages are processed gracefully. Why would one want do not do that? You would lose the data which was consumed and acknowledged on the broker.

Artem Bilan
  • 113,505
  • 11
  • 91
  • 118
  • So there is any way how to stop in-flight messages for further processing... – Atul Gupta Oct 14 '21 at 20:44
  • You can set some global flag along side with that `stop()` call and check for this flag within you process to reject the current in-flight message. There is no out-of-the-box solution for since your requirement is not typical. – Artem Bilan Oct 14 '21 at 20:46