Skip to content

Conversation

@acogoluegnes
Copy link
Collaborator

Necessary = queue does not exist if classic queue, durable,
and in a cluster setup. In such a case, the queue "does
not exist" as long as the node is down and becomes available
again when the node restarts. Consumers on other nodes
are then scheduled to subscribe for some time.

Fixes #330

Necessary = queue does not exist if classic queue, durable,
and in a cluster setup. In such a case, the queue "does
not exist" as long as the node is down and becomes available
again when the node restarts. Consumers on other nodes
are then scheduled to subscribe for some time.

Fixes #330
@acogoluegnes
Copy link
Collaborator Author

acogoluegnes commented May 23, 2022

Acceptance

Start a cluster from the umbrella:

make start-cluster PLUGINS="rabbitmq_management"

Get PerfTest and start it:

cd /tmp
git clone git@github.com:rabbitmq/rabbitmq-perf-test.git
cd rabbitmq-perf-test
git checkout rabbitmq-perf-test-330-some-classic-queues-do-not-have-consumers-after-node-restart
make binary
tar xf target/rabbitmq-perf-test-2.18.0-SNAPSHOT-bin.tar.gz
rabbitmq-perf-test-2.18.0-SNAPSHOT/bin/runjava com.rabbitmq.perf.PerfTest -x 10 -y 10 -r 10 -c 10 \
    -q 10 -qp 'cq-%d' -qpf 0 -qpt 9 --auto-delete false -f persistent \
   -H amqp://guest:guest@localhost:5672,amqp://guest:guest@localhost:5673,amqp://guest:guest@localhost:5674

Go to http://localhost:15672/#/queues, it should look like the following (10 queues, 10 msg / second each, 1 consumer each):

image

From the umbrella directory, stop and restart the first node:

./sbin/rabbitmqctl -n rabbit-1 stop_app; ./sbin/rabbitmqctl -n rabbit-1 start_app

After a few seconds, PerfTest should resume the consumers that went down: the consumed rate should still be 100 msg / second overall and the queues page should show that each queue has 1 consumer.

@acogoluegnes acogoluegnes marked this pull request as ready for review May 23, 2022 15:15
@michaelklishin michaelklishin merged commit b933117 into main May 23, 2022
@michaelklishin michaelklishin deleted the rabbitmq-perf-test-330-some-classic-queues-do-not-have-consumers-after-node-restart branch May 23, 2022 20:23
pivotal-rabbitmq-ci pushed a commit that referenced this pull request May 23, 2022
…ssic-queues-do-not-have-consumers-after-node-restart

Schedule re-subscription if necessary after node restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some classic queues don't have consumers after node restart

3 participants