Koji/MessageBus

Koji can be configured to send notifications of events and state changes to a AMQP (qpid) broker. This page explains how to configure Koji to communicate with a message bus and documents the structure and contents of the messages it sends.

Configuration
Koji message bus integration is implemented via a Koji hub plugin, which registers a callback that is executed when certain events occur on the hub. To install the plugin, install the  package on the Koji hub machine. To enable the plugin, edit the  entry of   so it contains. Make sure the  entry is not commented out.

Configuration of the message bus plugin itself is handled by editing. The  section defines how to connect to the AMQP broker you want to use. can be any authentication type supported by the SASL configuration of the broker. If using, you must also provide a   and  , and it is highly recommended to set. Otherwise you'll be sending your username and password over the network in plain text.

The  section determines where the plugin will send messages. The  option may be   or. The exchange may already exist, or the plugin will create it, in which case the account being used to connect to the broker must have sufficient privileges to create exchanges.

If using a topic exchange, you can set the prefix of the message routing key with the  option in the   section.

Messages are encoded/decoded using qpid's native datatype handling. Message contents will be provided in the native data structures of the language of the receiving process.

Message Formats
The following table lists the events for which messages are sent out, the structure of the routing key (when using a topic exchange), the message headers (when using a headers exchange), and the fields present in the body of the message. All message bodies are key/value maps.