Quantcast

How remove messages which must be ack

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How remove messages which must be ack

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)

Best Regards,
Artur
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How remove messages which must be ack

Tim Watson-6
Artur,

On 17 Dec 2013, at 14:49, rabbit15 wrote:

> 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
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How remove messages which must be ack

rabbit15
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How remove messages which must be ack

Michael Klishin-2
On 17 Jan 2014, at 18:10, rabbit15 <[hidden email]> wrote:

> 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


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How remove messages which must be ack

rabbit15
"I was afraid so.

Thank you for your answers."
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How remove messages which must be ack

cw storm
In reply to this post by Michael Klishin-2
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?


On Fri, Jan 17, 2014 at 9:19 AM, Michael Klishin <[hidden email]> wrote:
On 17 Jan 2014, at 18:10, rabbit15 <[hidden email]> wrote:

> 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


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How remove messages which must be ack

michaelklishin
2014-01-30 cw storm <[hidden email]>
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

_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How remove messages which must be ack

koushikpaul
This post has NOT been accepted by the mailing list yet.
In reply to this post by rabbit15
In my case the channel object has died already,  so it is not possible to send the messages back from unacked to ready.

Is there anyway to get rid of these unacked messages.
Loading...