Define RabbitMQ policies in configuration file

前端 未结 5 995
清歌不尽
清歌不尽 2021-02-02 12:50

I\'d like to define mirroring for all my queues by default. I currently have to use rabbitmqctl once the node is up:

rabbit         


        
5条回答
  •  鱼传尺愫
    2021-02-02 13:46

    Finally I found something which worked: No need of configMap or rabbitmq.config files. Under

    containers:
    ...
    ...
    ...
    
        lifecycle:
                  postStart:
                    exec:
                      command: ["/bin/sh","-c","rabbitmq-plugins --offline enable rabbitmq_management;until rabbitmqctl node_health_check; do  sleep 5;done;rabbitmqctl set_policy ha-all \".\" '{\"ha-mode\":\"all\", \"ha-sync-mode\":\"automatic\"}' --apply-to all --priority 0;"]
    

提交回复
热议问题