Ted Ross wrote:
There's a bug in QueueBindings.cpp (QueueBindings::unbind) where binding
records are not deleted when bindings/queues are removed. Except for
the memory leak, this is not a problem for operation. It is, however, a
problem for management as I now see orphaned bindings accumulating.
As far as I can tell, the only reason for this data structure to exist
is to unbind all bindings associated with a particular queue.
Yes, thats right. When a queue is deleted all the bindings to it must
also be deleted.
Since
bindings are a "manageable" entity (i.e. they have statistics and other
information associated with them), there might be a better way to
structure them such that they are more closely tied to the exchanges
that use them.
Bindings are links between queues and exchanges. The exchanges already
know which queues are bound to them (and the keys or arguments
associated with each binding). The QueueBindings class was merely an
attempt to record that same information in a way that was more readily
available to the queue when it is deleted.
Unless anybody has a different idea, I will propose a patch to
restructure this (and fix the memory leak).
Sounds good to me; it does seem like some restructuring would be good here!