amqp_url = "amqps://koji_sync_listener{{ env_suffix }}:@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Fpubsub"

publish_exchange = "amq.topic"
passive_declares = true

callback = "koji_sync_listener:KojiSyncListener"

# Don't use topic_prefix, since outgoing message topics are derived from incoming messages.
# topic_prefix = ""

[[bindings]]
queue = "bodhi_koji_sync_listener{{ env_suffix }}"

exchange = "amq.topic"
routing_keys = [
    "io.pagure.*.pagure.issue.edit",
]

[tls]
ca_cert = "/etc/pki/fedora-messaging/cacert.pem"
keyfile = "/etc/pki/fedora-messaging/bodhi-key.pem"
certfile = "/etc/pki/fedora-messaging/bodhi-cert.pem"

[client_properties]
app = "koji_sync_listener"
app_contacts_email = ["pingou@fedoraproject.org"]

[queues."bodhi_koji_sync_listener{{ env_suffix }}"]
durable = true
auto_delete = false
exclusive = false
arguments = {}

[consumer_config]

# XXX If you modify this taglist.  Please also modify the other copy in
# bodhi2/backend/tasks/main.yml
taglist = [
    "f40",
    "f40-container",
    "f40-flatpak",
    "f39",
    "f39-container",
    "f39-flatpak",
    "f38",
    "f38-container",
    "f38-modular",
    "f38-flatpak",
    "epel9",
    "epel9-next",
    "epel8",
    "epel8-next",
    "epel7",
    "module-package-list",
    "modular",
]

[qos]
prefetch_size = 0
prefetch_count = 25

[log_config]
version = 1
disable_existing_loggers = true

[log_config.formatters.simple]
format = "[%(levelname)s %(name)s] %(message)s"

[log_config.handlers.console]
class = "logging.StreamHandler"
formatter = "simple"
stream = "ext://sys.stdout"

[log_config.loggers.fedora_messaging]
level = "INFO"
propagate = false
handlers = ["console"]

[log_config.loggers.twisted]
level = "INFO"
propagate = false
handlers = ["console"]

[log_config.loggers.pika]
level = "WARNING"
propagate = false
handlers = ["console"]

# If your consumer sets up a logger, you must add a configuration for it
# here in order for the messages to show up. e.g. if it set up a logger
# called 'example_printer', you could do:
[log_config.loggers.koji_sync_listener]
level = "DEBUG"
propagate = false
handlers = ["console"]

[log_config.root]
level = "ERROR"
handlers = ["console"]
