Is it possible to cluster Rabbits that have different versions? For example, is it possible to have a cluster consisting of:
node 0: RabbitMQ 3.7.19
node 1: RabbitMQ 3.8.3
Related
Initially, we built 2 clusters (nodeA, nodeB) with rabbitmq and created quorum in the cluster.
However, knowing that two nodes cannot mirror, I added one node (node C) as a cluster during Rabbitmq operation, but the new node is not added to followers in the existing quorum queue. Is it possible to manually add a new node to followers?
yes, it is possible. See the documentation here
the command you are looking for is:
rabbitmq-queues add_member [-p <vhost>] <queue-name> <node>
How to migrate rabbitmq (everything) to bitnami rabbitmq cluster?
I have single node rabbitmq server with plenty of queues, exchanges, channels, producers and consumers.
We have a task to migrate everything of this rabbitmq server to a bitnami helm chart(https://bitnami.com/stack/rabbitmq/helm) rabbitmq with 3 node cluster, running in kubernetes cluster.
Current rabbitmq server hostname is different from what rabbitmq hostnames of three rabbitmq cluster nodes.
I'm a beginner with rabbitmq aspects.
So how do we approach this?
how to migrate data of a rabbitmq server whose hostname will be different from target rabbitmq server of bitnami helm chart cluster?
I know the HA Policy is set by the following command:
$ rabbitmqctl set_policy ha-all "" '{"ha-mode":"all","ha-sync-mode":"automatic"}'
My question which seems basic:
Do I have to issue this command on each node or just one of them?
RabbitMQ provides to distributes the policy to all the cluster, so it does not matter which node you select the info will be distribute to the other nodes.
Please read here: https://www.rabbitmq.com/clustering.html
A RabbitMQ broker is a logical grouping of one or several Erlang
nodes, each running the RabbitMQ application and sharing users,
virtual hosts, queues, exchanges, bindings, and runtime parameters.
Sometimes we refer to the collection of nodes as a cluster.
We have setup a RabbitMQ cluster with 3 nodes. If an effort to have some form of load balancing, we setup the policy to only sync across 2 of the nodes:
rabbitmqctl set_policy ha-2 . '{"ha-mode":"exactly","ha-params":2,"ha-sync-mode":"automatic"}'
This works as expected when all 3 nodes are online.
When we shutdown one of the nodes (to simulate a failure) queues mastered on the failed node are still available (on the slave) but not synchronized to another node. If we manually re-apply the policy, the queues then synchronize as expected.
Should we expect that all queues be mirrored in the scenario that one node fails with this policy?
Works as expected in RabbitMQ 3.5.4
I have a clustered HA rabbitmq setup. I am using the "exactly" policy similar to:
rabbitmqctl set_policy ha-two "^two\." \'{"ha-mode":"exactly","ha-params":10,"ha-sync-mode":"automatic"}'
I have 30 machines running, of which 10 are HA nodes with queues replicated. When my broker goes down (randomly assigned to be the first HA node), I need my celery workers to point to a new HA node (one of the 9 left). I have a script that automates this. The problem is: I do not know how to distinguish between a regular cluster node and a HA node. When I issue the command:
rabbitmqctl cluster_status
The categories I get are "running nodes", "disc", and "ram". but there is no way here to tell if a node is HA.
Any ideas?
In cluster every node share everything with another, so you don't have do distinguish nodes in your application in order to access all entities.
In your case when one of HA node goes down (their number get to 9), HA queues will be replicated to first available node (doesn't matter disc or ram).