rabbitmq_cluster: Create the zmq.topic and bind it to amq.topic

This way amq.topic in the public vhost gets all messages.

Signed-off-by: Jeremy Cline <jeremy@jcline.org>
This commit is contained in:
Jeremy Cline 2019-03-22 20:26:30 +00:00
parent e5c5720d5b
commit 36d43c5d55

View file

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