On 16 September 2014 at 23:18:03, Kris Reese (
ktr...@gmail.com) wrote:
> Further down, in the example provided for setting the policy
> to mirror queues to all nodes in the cluster, I noticed the example
> command does not use the "--apply-to queues" switch. Let's say,
> this was used to set a policy to mirror all queues:
>
> rabbitmqctl set_policy ha-all ".*" '{"ha-mode":"all"}'
>
> While I understand that setting up a cluster syncs any users,
> virtual hosts, queues, exchanges, etc that are created across
> the cluster, where "exchanges and bindings can always be considered
> to be on all nodes", I was wondering if this policy would have any
> adverse effects if it were "--apply-to queues" only, since it
> would not then also apply to exchanges.
Exchanges do not actually exist. They are just routing table names. Routing table
rows are bindings. The table is automatically distributed between all cluster nodes.
Same goes for queue parameters, vhosts, users, and permissions.
Queue *contents* by default are not replicated. --apply-to "queues" is needed
when a policy may affect exchanges semantically.
A policy that adds "ha-mode" won't affect exchanges, so don't worry about it.
But if you want to explicitly use --apply-to "queues", nothing wrong with that.
--
MK
Staff Software Engineer, Pivotal/RabbitMQ