Cannot get rabbitmq_sharding plugin to work #14441
-
Community Support Policy
RabbitMQ version used4.1.2 Erlang version used27.3.x Operating system (distribution) usedRHEL 9/Docker How is RabbitMQ deployed?Community Docker image rabbitmq-diagnostics status outputSee https://www.rabbitmq.com/docs/cli to learn how to use rabbitmq-diagnostics Logs from node 1 (with sensitive values edited out)See https://www.rabbitmq.com/docs/logging to learn how to collect logs Logs from node 2 (if applicable, with sensitive values edited out)See https://www.rabbitmq.com/docs/logging to learn how to collect logs Logs from node 3 (if applicable, with sensitive values edited out)See https://www.rabbitmq.com/docs/logging to learn how to collect logs rabbitmq.confSee https://www.rabbitmq.com/docs/configure#config-location to learn how to find rabbitmq.conf file location Steps to deploy RabbitMQ clusterSteps to reproduce the behavior in questionAdded rabbitmq_sharding to the enabled_plugins file and restarted. I tried to follow the steps on https://github.com/rabbitmq/rabbitmq-server/blob/main/deps/rabbitmq_sharding/README.md for testing. rabbitmqctl set_policy images-shard "^shard.images$" '{"shards-per-node": 2, "routing-key": "1234"}' advanced.configSee https://www.rabbitmq.com/docs/configure#config-location to learn how to find advanced.config file location Application code# PASTE CODE HERE, BETWEEN BACKTICKSKubernetes deployment file# Relevant parts of K8S deployment that demonstrate how RabbitMQ is deployed
# PASTE YAML HERE, BETWEEN BACKTICKSWhat problem are you trying to solve?Use rabbitmq_sharding. I also don't see any queues created in the managment ui. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
The plugin works as before. We haven't touched it for a while. All it takes is declaring an exchange of type rabbitmqctl set_policy images-shard "^shard.images$" '{"shards-per-node": 2, "routing-key": "1234"}'Which results in two queues per node declared by the plugin and bound to the
|
Beta Was this translation helpful? Give feedback.


The plugin works as before. We haven't touched it for a while.
All it takes is declaring an exchange of type
x-modulus-hashprovided by the plugin, then setting up a policy that will match it:Which results in two queues per node declared by the plugin and bound to the
x-modulus-hashexchange:rabbitmq_shardingRelevance in 2025However, in the age of streams and partitioned streams,
rabbitmq_shardingis no longer necessary or relevant.So, simply use streams or partitioned streams with a RabbitMQ Stream Protocol client. If deploying to an environment that mandates the use of proxies, su…