Discussion:
[rabbitmq-discuss] How remove messages which must be ack
rabbit15
2013-12-17 14:49:23 UTC
Permalink
Hi, I have question about how to remove messages from queue.
This messages must be ack and I can't stop the consumer.
I want to stop the consumer and clear the queue (purge)

Best Regards,
Artur



--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/How-remove-messages-which-must-be-ack-tp32168.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
Tim Watson
2014-01-07 10:09:49 UTC
Permalink
Artur,
Post by rabbit15
Hi, I have question about how to remove messages from queue.
This messages must be ack and I can't stop the consumer.
I want to stop the consumer and clear the queue (purge)
I don't understand the problem I'm afraid. Are you saying that you want to stop the consumer without loosing messages? Won't clearing/purging the queue lead to message loss anyway? Or are you trying to find a way to stop the consumer only after all the queue's messages have been drained?

Cheers,
Tim
rabbit15
2014-01-17 14:10:21 UTC
Permalink
Hi,
My problem can be described, as follows:

There is existing, working Rabbit environment with queues, exchanges,
producers and consumers working. What I need is to clear every queue (delete
ack'ed and unack'ed messages). I have no acces to existing consumers
objects, hovewer i could create new one just for this purpose. Current
consumers should be not disturbed and after clear, whole environment should
work as previously. The main problem is, that Purge method does not delete
messages, which awaits for acknowledments. I want to be sure, that EVERY
message is already deleted.

Is there any way to perform such operation? Or is this contrary to any
Rabbit architecture design?

Best Regards,
Artur



--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/How-remove-messages-which-must-be-ack-tp32168p32669.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
Michael Klishin
2014-01-17 14:19:15 UTC
Permalink
Post by rabbit15
There is existing, working Rabbit environment with queues, exchanges,
producers and consumers working. What I need is to clear every queue (delete
ack'ed and unack'ed messages). I have no acces to existing consumers
objects, hovewer i could create new one just for this purpose. Current
consumers should be not disturbed and after clear, whole environment should
work as previously. The main problem is, that Purge method does not delete
messages, which awaits for acknowledments. I want to be sure, that EVERY
message is already deleted.
Is there any way to perform such operation?
You cannot remove messages that are unacknowledged.

You can forcefully close their connections, which will cause messages to be requeued,
the purge the queue.

MK

Software Engineer, Pivotal/RabbitMQ
rabbit15
2014-01-20 14:19:52 UTC
Permalink
"I was afraid so.

Thank you for your answers."



--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/How-remove-messages-which-must-be-ack-tp32168p32719.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
cw storm
2014-01-30 15:13:07 UTC
Permalink
Hi MK,

Couldn't something be configured on the queue that if the message is in
"unack" status for certain amount of time, it can be requeue or that
connection could be automatically closed?
Post by rabbit15
Post by rabbit15
There is existing, working Rabbit environment with queues, exchanges,
producers and consumers working. What I need is to clear every queue
(delete
Post by rabbit15
ack'ed and unack'ed messages). I have no acces to existing consumers
objects, hovewer i could create new one just for this purpose. Current
consumers should be not disturbed and after clear, whole environment
should
Post by rabbit15
work as previously. The main problem is, that Purge method does not
delete
Post by rabbit15
messages, which awaits for acknowledments. I want to be sure, that EVERY
message is already deleted.
Is there any way to perform such operation?
You cannot remove messages that are unacknowledged.
You can forcefully close their connections, which will cause messages to be requeued,
the purge the queue.
MK
Software Engineer, Pivotal/RabbitMQ
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140130/d706d882/attachment.html>
Michael Klishin
2014-01-30 19:40:47 UTC
Permalink
2014-01-30 cw storm <cwstorm at gmail.com>
Post by cw storm
Couldn't something be configured on the queue that if the message is in
"unack" status for certain amount of time, it can be requeue or that
connection could be automatically closed?
There is no such feature in RabbitMQ.

Applications can track how long it takes for a delivery to be processed and
close
the channel on timeout.
--
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140130/17049fe7/attachment.html>
Continue reading on narkive:
Loading...