Hi All,
When I set the below combined policy, It works fine.
# rabbitmqctl set_policy ha-three-TTL test '{"ha-mode":"exactly","ha-params":3,"ha-sync-mode":"automatic","message-ttl":3600000}'
When I set the below policies, they also work fine.
# rabbitmqctl set_policy test_TTL .*test.* '{"message-ttl":3600000}' --apply-to queues --priority 44
# rabbitmqctl set_policy test_TTL_SMS .*test.Sms.* '{"message-ttl":18000000}' --apply-to queues --priority 51
# rabbitmqctl set_policy test_TTL_Mail .*test.Mail.* '{"message-ttl":18000000}' --apply-to queues --priority 52
# rabbitmqctl set_policy test_TTL_ServiceLog .*test.ServiceLog.* '{"message-ttl":86400000}' --apply-to queues --priority 58
But when I set the below policies, they don't work as I expected. TTL policies didn't clear the queue for the test queue and test Sms queue and so.
# rabbitmqctl set_policy ha-three-test_TTL
.*test.* '{"ha-mode":"exactly","ha-params":3,"ha-sync-mode":"automatic","message-ttl":3600000}' --apply-to queues --priority 44
# rabbitmqctl set_policy ha-three-test_TTL_SMS .*test.Sms.* '{"ha-mode":"exactly","ha-params":3,"ha-sync-mode":"automatic","message-ttl":18000000}' --apply-to queues --priority 52
# rabbitmqctl set_policy ha-three-test_TTL_Mail
.*test.Mail.* '{"ha-mode":"exactly","ha-params":3,"ha-sync-mode":"automatic","message-ttl":18000000}' --apply-to queues --priority 52
# rabbitmqctl set_policy ha-three-test_TTL_ServiceLog
.*test.ServiceLog.* '{"ha-mode":"exactly","ha-params":3,"ha-sync-mode":"automatic","message-ttl":86400000}' --apply-to queues --priority 58 I don't understand the reason of why the policies don't work as my expectations. Is there anyone who know how I should set the policies. I just want queue replication policies and TTL policies to work together according to the priority I set.
I googled a lot, but didn't find any solid solution to that.
Thanks in advance