Closed jharting closed 6 years ago
Thank you for the report and the detailed (and correct) reproduction steps.
https://gist.github.com/lukebakken/7459fbb4fcbfa1062198c36ca0d8fd41
A fix will be included into 3.7.4
and 3.6.16
.
@michaelklishin that's awesome! Appreciate the quick turnaround.
I am observing what I believe is a bug:
I am running a 2-node RabbitMQ cluster in OpenShift with rabbitmq-peer-discovery-k8s plugin. A template I use to deploy the cluster can be found here. I am setting
queue_master_locator=min-masters
inrabbitmq.conf
for the queues to be created evenly across the cluster nodes.The problem
Queues are not distributed evenly. Here are the steps to reproduce: 1) Start a fresh 2-node rabbitmq cluster 2) Create topic exchange 3) Create
queue0
4) Create 6 different bindings from the exchange toqueue0
5) Create 6 more queues (with no bindings)Expected
roughly half of the clues resides on node0, the rest on node1
Actual
queue0
is the only queue on node0, all the other queues end up on node1If I keep adding queues (with no bindings) the 7th or 8th will finally land on node0 making queue0 and queue7/8 the only queues on node0.
It looks as if the bindings counted into the number of queues on each node RabbitMQ is deciding which node a queue should land on.
In our app this causes one queue (which uses a lot of bindings) to take an entire cluster node for itself while all othe other queues end up being created on the other node.
If I don't use bindings in the reproducer then queues are created evenly as expected.
Reproducer:
rabbitmq-plugins list