postwait / node-amqp

[UNMAINTAINED] node-amqp is an AMQP client for nodejs
MIT License
1.69k stars 357 forks source link

Queue destroy callback #226

Open jacobstr opened 11 years ago

jacobstr commented 11 years ago

It would be nice to have a callback for the successful/failed destruction of a queue.

E.g. we have a long running process that orchestrates a multi-step job. Once this is done, I'd like to clean the queues up. Currently, I iterate over each queue and destroy it, then exit after a timeout period but it's slightly unreliable. From my experiments, if the connection is closed before the queues have been destroyed they will not be destroyed.

bakkerthehacker commented 11 years ago

the queue emits an event for any amqp message it receives. you could listen for the destroy event with this code:

queue.on('queueDeleteOk', function(){});
jgato commented 10 years ago

Is there any place where we could see all the supported events?