Up

openSUSE AMQP service

Live events

Waiting for events…

About

This server runs an RabbitMQ AMQP Message bus for the openSUSE infrastructure. General information about the AMQP infrastructure can be found here.

The messages consist of a topic (subject) and a body. The topic format is described below:

SCOPE.APPLICATION.OBJECT.ACTION
^     ^           ^      ^
|     |           |      |
|     |           |      +----- What happend with the object (verb in nonfinite form)
|     |           +------------ What object was touched by the action
|     +------------------------ In which application did the event occur
+------------------------------ Was it an internal or external application
The message body is JSON encoded and contains more details about the event.

All events have the SCOPE set to opensuse. The APPLICATION is eg. openqa or obs.

A list of events for OBS can be found in the OBS Admin Guide.

Event sources

Currently (as of 2018-05-23) the following services are sending events via this server:

Consuming events

The URL for consuming events is:

amqps://opensuse:opensuse@rabbit.opensuse.org
The RabbitMQ server has an exchange with the name pubsub. All events are routet via this exchange. The exchange is durable so it needs to be declared with passive=True and durable=True. It is a topic exchange, so you will also need to specify exchange_type='topic'. A topic exchange allows filtering the events by their topic using a routing_key. To consume events, you need to declare your own queue with exclusive=True. To select the events that you are interested in you can define a routing_key to filter out the topics that you desire. Filtering events by topic is described in the RabbitMQ documentation.

Example

An example script for consuming messages can be found in amqp_get_opensuse.py. It requires python3 and the pika module. The routing_key in line 14 is set to #, so you will get all messages.