From be681e40f33ae2feb84cffe0e5349538747e2426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Wed, 9 Oct 2019 18:04:11 +0200 Subject: [PATCH] Bind AMQP queues to both amq.topic and zmq.topic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Bompard --- roles/rabbit/queue/tasks/main.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/roles/rabbit/queue/tasks/main.yml b/roles/rabbit/queue/tasks/main.yml index 7259984f6e..68ced30157 100644 --- a/roles/rabbit/queue/tasks/main.yml +++ b/roles/rabbit/queue/tasks/main.yml @@ -66,7 +66,7 @@ login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}" tags: fedora-messaging -- name: Bind the {{ queue_name }} queue to the topic exchange +- name: Bind the {{ queue_name }} queue to the amq.topic exchange delegate_to: "{{ rabbitmq_server }}" rabbitmq_binding: name: "amq.topic" @@ -80,6 +80,21 @@ loop: "{{ routing_keys }}" tags: fedora-messaging +# This can be removed when we're done with fedmsg and the bridges are retired. +- name: Bind the {{ queue_name }} queue to the zmq.topic exchange + delegate_to: "{{ rabbitmq_server }}" + rabbitmq_binding: + name: "zmq.topic" + destination: "{{ queue_name }}" + destination_type: queue + routing_key: "{{ item }}" + vhost: "{{ vhost }}" + state: present + login_user: admin + login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}" + loop: "{{ routing_keys }}" + tags: fedora-messaging + - name: Monitor the {{ queue_name }} queue in Nagios (NRPE) when: thresholds and env == "production" delegate_to: "{{ rabbitmq_server }}"