Feature Request: Delete all queue items

618 views
Skip to first unread message

Thomas

unread,
Nov 24, 2014, 3:41:53 AM11/24/14
to elas...@googlegroups.com
Hey Adam,

first of all: ElasticMQ is great. We use it for months for testing purposes and it worked out very well for us. But there is one feature missing which would be great for our testing environment. I know there is no way in the original SQS implementation to do this and I would assume you would like to be compatible as much as you can with it. But for us it would be great if there is a way to delete the whole queue content (visible and invisible message, w/o removing the actual queue) with a specific call. Is there any way you can implement this?

Kind regards,
Thomas

Adam Warski

unread,
Nov 24, 2014, 7:42:38 AM11/24/14
to elas...@googlegroups.com
Hello,

sure, everything can be implemented ;)
Some testing-related extensions to the actual SQS capabilities could make sense.

I’m just wondering, can’t you just delete & create the queue?

Also, how would you like to invoke to queue-clearing operation? (as obviously it wouldn’t be supported by any SDKs)

Adam

--

---
You received this message because you are subscribed to the Google Groups "ElasticMQ" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticmq+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Thomas

unread,
Nov 24, 2014, 5:41:12 PM11/24/14
to elas...@googlegroups.com
Thanks for your fast response Adam.

Deleting the whole queue isn't really an option for us since our service is polling with multiple threads all the time. And if the queue is for a short time not available it will throw errors. I tried it once and it doesn't really work properly.

Yes, unfortunately the SDK wouldn't work and I would assume thats the point where it gets a little bit tricky. My idea would be to define a separat test  (REST) api endpoint and one operation would be the flush queue operation. Maybe in the future this endpoint could be extended with other testing relevant functionality (monitoring queue operation,  deleting specifc messags ...). We would write a client by our own to call this endpoint. 

kind regards
Thomas

Adam Warski

unread,
Dec 1, 2014, 9:35:38 AM12/1/14
to elas...@googlegroups.com
Hello,

I added a new endpoint, a request to:

[queue url]?Action=Clear

should clear the queue.

Let me know if this works for you!
Adam

John

unread,
Dec 2, 2014, 4:14:06 AM12/2/14
to elas...@googlegroups.com
Hi Adam,

I tried it locally and it seems to work properly for me :) Thank you very much for your fast response and implementation.

Kind regards,
Thomas 

--

---
You received this message because you are subscribed to a topic in the Google Groups "ElasticMQ" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticmq/HBKJGi5sE6A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticmq+...@googlegroups.com.

Adam Warski

unread,
Dec 2, 2014, 4:32:36 AM12/2/14
to elas...@googlegroups.com
Great, I’ll make a release soon and let you know.

Adam

Adam Warski

unread,
Dec 2, 2014, 12:26:21 PM12/2/14
to elas...@googlegroups.com
On 02 Dec 2014, at 10:14, John <johnnyen...@gmail.com> wrote:

Adam Warski

unread,
Dec 11, 2014, 11:58:21 AM12/11/14
to elas...@googlegroups.com
I think Amazon was reading this thread and today they released a new feature of SQS: removing all messages ;) The action is called "PurgeQueue".

I released ElasticMQ 0.8.5 which removes support for the custom action and instead supports purging.

Adam

Thomas

unread,
Dec 17, 2014, 7:55:41 AM12/17/14
to elas...@googlegroups.com
What a coincidence ;) I hope it wasn't that much effort to change this back to this PurgeQueue action, since the purging logic should be the same. I will change this my tests as well. 

Thanks for the update and have a nice christmas time.

Best regards,
Thomas

Adam Warski

unread,
Dec 17, 2014, 8:00:46 AM12/17/14
to elas...@googlegroups.com
Not at all, a simple rename :)

Adam

--

---
You received this message because you are subscribed to the Google Groups "ElasticMQ" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticmq+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages