From 6b37dbef66610d4d3e337df98f7d1432a0804282 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 19 Sep 2019 13:58:02 +0200 Subject: [PATCH] Koschei: fedora-messaging consumer configuration --- .../templates/fedora-messaging.toml.j2 | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/roles/openshift-apps/koschei/templates/fedora-messaging.toml.j2 b/roles/openshift-apps/koschei/templates/fedora-messaging.toml.j2 index 74c8a0acb0..2d94230f7c 100644 --- a/roles/openshift-apps/koschei/templates/fedora-messaging.toml.j2 +++ b/roles/openshift-apps/koschei/templates/fedora-messaging.toml.j2 @@ -1,12 +1,28 @@ amqp_url = "amqps://koschei{{ env_suffix }}:@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Fpubsub" - -{% if env == "staging" %} -topic_prefix = "org.fedoraproject.stg" -{% else %} -topic_prefix = "org.fedoraproject.prod" -{% endif %} +topic_prefix = "org.fedoraproject.{{ fedmsg_env }}" +passive_declares = true [tls] ca_cert = "/etc/koschei/rabbitmq-ca.crt" certfile = "/etc/koschei/rabbitmq-client.crt" keyfile = "/etc/koschei/rabbitmq-client.key" + +[exchanges."amq.topic"] +type = "topic" +durable = true +auto_delete = false +arguments = {} + +[queues."koschei.stg"] +durable = true +auto_delete = false +exclusive = false +arguments = {} + +[[bindings]] +queue = "koschei.stg" +exchange = "amq.topic" +routing_keys = [ + "org.fedoraproject.stg.buildsys.tag", + "org.fedoraproject.stg.buildsys.task.state.change", +]