graze / queue

:postbox: Flexible abstraction for working with queues in PHP.
MIT License
49 stars 10 forks source link

Support deleting queues #19

Closed h-bragg closed 8 years ago

h-bragg commented 9 years ago

Enable deleting the queue functionality!

sjparkinson commented 9 years ago

Mind including some use cases / workflows?

I'm trying to think how this would work for the ArrayAdapter, and if it should be supported.

Will asked a good question in #16, "can every implementation support purging", and I should ask the same question here. For Kafka, it doesn't look like any of the php clients support deleting topics. Beanstalkd is a little weird in that the queue/topic lives on the port.

I think the answer is that deleting topics/queues/channels is perhaps too client specific to support a general for, unless we're willing to go down the route of throw NotSupportedException.

Thoughts?

h-bragg commented 9 years ago

This is be based on one of our uses of queue.

As part of a batch processing we create a queue for each batch of jobs to be processed. Once we have finished the batch we would like to tidy up (delete the queue).

Currently this client owns everything about the queue so it would be hard to do it outside.