Bind AMQP queues to both amq.topic and zmq.topic

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
Aurélien Bompard 2019-10-09 18:04:11 +02:00 committed by Pierre-Yves Chibon
parent 5c94352aa3
commit be681e40f3

View file

@ -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 }}"