multiple non-conflicting policies of same priority

137 views
Skip to first unread message

Gowri Sankar Suryanarayana

unread,
Feb 12, 2021, 12:23:20 PM2/12/21
to rabbitm...@googlegroups.com
Hello!

We have an existing policy on HA (set to ha-all) for the queues with the default priority (0)

Now, we're planning to create a new policy on Queue Master Locator (set to min-masters applying to Queues) with the default priority of 0 . Based on the experiments in test environments, it seems this new policy doesn't seem to be picked up. The MQs don't seem to have a uniform distribution

I've gone through this GitHub issue - https://github.com/rabbitmq/rabbitmq-server/issues/841

Is there a way we can make RabbitMQ honour the 2nd policy in addition to the 1st one? I'm guessing a higher priority (1 or more) will help but I want to know for sure

RabbitMQ Broker - 3.8.3
Erlang VM - 22.3.4.1

Please let me know if you need more info

--
A.S.Gowri Sankar

Ayanda

unread,
Feb 15, 2021, 6:03:35 AM2/15/21
to rabbitmq-users
Hello,
You can combine the 2 into a single policy, e.g.
rabbitmqctl set_policy my-ha-all-policy ".*" '{"ha-mode":"all","ha-sync-mode":"automatic", "queue-master-locator":"min-masters"}' --apply-to queues --priority 1
This will apply for new queues [1]. For active queues, use the rebalance command[2]. Only operator policies[3] can be merged to existing policies.

I suggest you set this config once off in the rabbitmq.conf file[4]. It's easier to manage: queue_master_locator = min-masters

Gowri Sankar Suryanarayana

unread,
Feb 18, 2021, 2:09:12 PM2/18/21
to rabbitm...@googlegroups.com
Thank you, Ayanda

I ended up combining the policies like you said. It worked well for new queues

I didn't know about the rebalance option. Is it sufficient that we execute this command on only one node in a given cluster

Thank you very much!

--
A.S.Gowri Sankar


Our upcoming conferences: 

Lambda Days: 16-19 February 2021
Code BEAM V America: 10-12 March 2021
Code BEAM V Europe: 19-21 May 2021
ElixirConf EU: 8-10 September 2021
Code Beam SF: 4-5 November 2021



Erlang Solutions cares about your data and privacy; please find all details about the basis for communicating with you and the way we process your data in our Privacy Policy. You can update your email preferences or opt-out from receiving Marketing emails here.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/d02e4fa4-740a-4b48-ae73-87bcedfae08en%40googlegroups.com.

Diana Parra Corbacho

unread,
Feb 19, 2021, 4:35:26 AM2/19/21
to rabbitm...@googlegroups.com

Yes, rebalance needs to be called only once in one node

Gowri Sankar Suryanarayana

unread,
Feb 19, 2021, 9:05:01 AM2/19/21
to rabbitm...@googlegroups.com
Thank you, Diana

Do we need to take precautions when running this command while the message traffic is flowing in and out of the message broker?

--
A.S.Gowri Sankar


Reply all
Reply to author
Forward
0 new messages