EventBus

EventBus is an Kafka-based event queue, which provides a shared & reliable communication channel between Wikimedia services.

Event production for many edit-related events is currently handled by the EventBus MediaWiki extension. Most new events are sent to a REST service that is part of the EventLogging extension, which validates their schema & writes them to Kafka. Each event has a predefined schema, stored in the gerrit repository. Each topic is prefixed by the datacenter name that event is produced from.

A major user (both consumer & producer) is the ChangePropagation service.

Event Metadata
Each event in the system contains a  field that wraps generic meta information for the event. It has the following fields
 * The queue topic name this message belongs to.
 * The URI identifying the jsonschema for this event. This may be just a short uri containing only the name and revision at the end of the URI path.  e.g. schema_name/12345 is acceptable.  This field is not required.
 * The unique URI identifying the event.
 * The unique UUID v1 ID of the event derived from the X-Request-Id header.
 * The unique version 1 UUID of this event; should match the dt field.
 * The time stamp of the event, in ISO8601 format.
 * The domain the event pertains to.

Supported Topics
Currently the following topics are supported: Several other topics exist in the EventBus, however they are specific to the service and are not intended for public use. Normally these events are prefixed by the service name. Examples:,.
 * : Represent new revision creation in the wiki. Null edits are not included in this topic.
 * : Represent page deletion
 * : Represents a page restore
 * : Represents an event of changing MW revision visibility
 * : Represents an event of page renaming (moving). However, when a user manually edits a page and creates a redirect using wikitext, the event is not emitted.
 * : Represents a user blocking operation.
 * : Represents a generic resource change. This is an ubiquitous event that could be emitted by every part of the services infrastructure when some resource is changed. The event contains a URI of the resource and the set of tags that help to identify the reason of the change. Some examples:
 * MW emits a it when a certain page is purged
 * MW emits a it when it detects a null edit on the page
 * RESTBase emits a it when it detects that some of the stored resources were changed after a rerender
 * Change propagation emits it when it detects that some content, transcluded to a page was changed. An example is template updates.