diff --git a/roles/rabbitmq_cluster/tasks/main.yml b/roles/rabbitmq_cluster/tasks/main.yml index d590ff0b5b..5e6e6b77f1 100644 --- a/roles/rabbitmq_cluster/tasks/main.yml +++ b/roles/rabbitmq_cluster/tasks/main.yml @@ -192,6 +192,28 @@ - rabbitmq_cluster - config +- name: Create the zmq.topic exchange in /public_pubsub + run_once: true + delegate_to: "rabbitmq01{{ env_suffix }}.phx2.fedoraproject.org" + rabbitmq_exchange: + name: "zmq.topic" + vhost: "/public_pubsub" + login_user: admin + login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}" + +# We keep them separated in /pubsub so we can bridge messages back to zmq +- name: Forward all zmq.topic to amq.topic in the public_pubsub vhost + run_once: true + delegate_to: "rabbitmq01{{ env_suffix }}.phx2.fedoraproject.org" + rabbitmq_binding: + destination_type: exchange + name: zmq.topic + dest: amq.topic + routing_key: "#" + vhost: "/public_pubsub" + login_user: admin + login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}" + - name: Configure a policy to ensure the public vhost stays swept up and tidy run_once: true delegate_to: "rabbitmq01{{ env_suffix }}.phx2.fedoraproject.org"