Open jmalloc opened 6 years ago
I've prototyped the queue.delete
in 169-queue-delete, however deleting in this way is racy - a queue.delete
issued by one peer may might occur between a queue.declare
and a basic.consume
of another peer. The tests will probably fail due to this problem.
This could be handled by retrying the queue.declare
after basic.consume
fails with an AMQP NOT_FOUND
exception.
/cc @ezzatron, @danilvpetrov
Rinq's public API does not expose a method for cleaning up the underlying resources that are created for a namespace when it is no longer in use. IIRC for the AMQP implementation it is only the namespace-scoped "balanced" command queues that stick around permanently.
~It may be adequate~ It's probably a good idea to issue an AMQP
queue.delete
with theif-unused
andif-empty
bits sent whenUnlisten()
is called or the peer shuts down.