How to purge a queue

5 views
Skip to first unread message

donV

unread,
Dec 1, 2009, 8:14:18 AM12/1/09
to AMQP
Hi all!

Is there away to purge a queue? We need to remove all messages from a
queue before sending a message.

Uwe Kubosch

unread,
Dec 3, 2009, 6:36:16 PM12/3/09
to ruby...@googlegroups.com
We have now added the Queue#purge method to AMQP. Anyone interrested?

--
With kind regards
Uwe Kubosch
Kubosch Consulting
u...@kubosch.no
http://kubosch.no/





Matt Todd

unread,
Dec 3, 2009, 6:39:18 PM12/3/09
to ruby...@googlegroups.com
+1
I would love to see this in the next release.

What's the implementation look like?

Matt








--

You received this message because you are subscribed to the Google Groups "AMQP" group.
To post to this group, send email to ruby...@googlegroups.com.
To unsubscribe from this group, send email to ruby-amqp+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ruby-amqp?hl=en.





--
Matt Todd
Highgroove Studios
www.highgroove.com
cell: 404-314-2612
blog: maraby.org

Scout - Web Monitoring and Reporting Software
www.scoutapp.com

Uwe Kubosch

unread,
Dec 3, 2009, 6:44:53 PM12/3/09
to ruby...@googlegroups.com

On Dec 4, 2009, at 12:39 AM, Matt Todd wrote:

+1
I would love to see this in the next release.

What's the implementation look like?

class MQ
  class Queue
    def purge opts = {}
      @mq.callback{
        @mq.send Protocol::Queue::Purge.new({ :queue => name,
                                               :nowait => true }.merge(opts))
      }
      nil
    end
  end
end


Any and all comments are very welcome :)  This is our first time touching the AMQP source :)
Reply all
Reply to author
Forward
0 new messages