Extension:EventBus

From MediaWiki.org
Jump to: navigation, search


MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
EventBus

Release status:Extension status beta

ImplementationTemplate:Extension#type Data extraction
DescriptionTemplate:Extension#description Propagation of change events to a RESTful service
Author(s)Template:Extension#username EEvans (WMF)talk
Latest versionTemplate:Extension#version 0.1 (2015-11-19)
MediaWikiTemplate:Extension#mediawiki 1.27+
PHPTemplate:Extension#php 5.4+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Download
Hooks usedTemplate:Extension#hook
PageContentSaveCompleteManual:Hooks/PageContentSaveComplete
ArticleDeleteCompleteManual:Hooks/ArticleDeleteComplete
ArticleUndeleteManual:Hooks/ArticleUndelete
ArticleUndeleteManual:Hooks/ArticleUndelete
TitleMoveCompleteManual:Hooks/TitleMoveComplete
ArticleRevisionVisibilitySetManual:Hooks/ArticleRevisionVisibilitySet

Translate the EventBus extension if it is available at translatewiki.net

Check usage and version matrix.

IssuesPhabricator

Open tasks · Report a bug

The EventBus extension propagates state changes (edit, move, delete, revision visibility, etc) to a RESTful event service, providing consumers of the service with the means of tracking changes to MediaWiki content.

Known Issues[edit]

Ideally, this sort of change propagation would be atomic, that is to say, if one of the tracked changes is committed in MediaWiki, the corresponding event is guaranteed to be delivered (even if by eventual consistency). As this extension is hook-based, that is not currently the case; Truly reliable event delivery will likely require something bound to the corresponding database transaction.

In the long-term, expect to see this extension deprecated in favor of support for atomic event production integrated into MediaWiki core, (tracked in task T120242).

Download / Install[edit]

The extension can be retrieved directly from Git [?]:

  • Browse code
  • Some extensions have tags for stable releases.
  • Each branch is associated with a past MediaWiki release. There is also a "master" branch containing the latest alpha version (might require an alpha version of MediaWiki).

Extract the snapshot and place it in the extensions/EventBus/ directory of your MediaWiki installation.

If you are familiar with git and have shell access to your server, you can also obtain the extension as follows:

cd extensions/
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/EventBus.git
  • To enable, add the following code to the bottom of your LocalSettings.php:
wfLoadExtension( 'EventBus' );
  • YesY Done; Navigate to 'Special:Version' on your wiki, and verify the extension is successfully installed

Configuration[edit]

Note: For this extension to be useful, you need to be running an event service.

To configure the event service URL, add the following to your LocalSettings.php, (setting the URL value according to your environment):

$wgEventServiceUrl = 'http://hostname:8888/v1/events';

References[edit]