bunny-mock icon indicating copy to clipboard operation
bunny-mock copied to clipboard

Duplicate Bindings

Open verenion opened this issue 5 years ago • 0 comments

If you bind a queue to an exchange multiple times, then publish a message to the exchange, the expectation is to only receive one message. This can be seen in bunny here:

@bindings.push(binding) unless @bindings.include?(binding)

It only creates a new binding if the binding doesn't already exist. The Bunny Mock gem however doesn't perform this check, so when the queue is bound multiple times, if we perform publish, the message count is wrong.

verenion avatar Sep 25 '19 14:09 verenion