0

I need to apply Q expire Policy for all Vhosts in RabbitMQ,Is there any way we can apply a policy for all Vhosts from commandline.

Akshat
  • 575
  • 2
  • 12
  • 28

1 Answers1

2

There is no.

you could write a script like this:

for i in `rabbitmqctl list_vhosts`; do
rabbitmqctl -p $i  set_policy expiry "" '{""expires":60000"}' --apply-to queues
done;

I think you have to skip the first two values

Gabriele Santomaggio
  • 21,656
  • 4
  • 52
  • 52