| commit | aa85993e5887e6426738963810105ab307904f89 | [log] [tgz] |
|---|---|---|
| author | Krinkle <krinklemail@gmail.com> | Mon Oct 29 19:18:44 2018 +0000 |
| committer | Gerrit Code Review <gerrit@wikimedia.org> | Mon Oct 29 19:18:44 2018 +0000 |
| tree | b3327889bdeda17324a91bc3aee1879056b4bf7b | |
| parent | 2b7835ae21d0d4d8c2e4dd58ec4908f1fa2456ac [diff] | |
| parent | 19817bb5036aaf524e8751464cf4924361fc3659 [diff] |
Merge "Remove obsolete pushLazyJobs() deferred update call"
EventBus is a MediaWiki extension that produces changes to a RESTful event service.
This extension is part of a larger effort to create a general purpose event system, to reliably propagate state changes from one part of the infrastructure, to another. Since this approach relies upon hooks, it is not atomic (delivery of an event could fail after MediaWiki has committed the corresponding change), and so does not provide the reliability we're aiming for. Therefore, this extension should be considered an interim solution, until the requisite changes can be made to MediaWiki core.
To configure the URL of the EventBus service:
$wgEventServiceUrl = 'http://localhost:8085/v1/topics';
To configure the EventBus service request timeout:
$wgEventServiceTimeout = 5; // 5 second timeout
This extension also provides an RCFeedEngine and RCFeedFormatter implementation That will allow RCFeed configuration to post to the EventBus service in the mediawiki.recentchange topic. To use, add the following to your LocalSettings.php:
$wgRCFeeds['eventbus'] = array( 'formatter' => 'EventBusRCFeedFormatter', 'uri' => 'eventbus://localhost:8085/v1/events', ); $wgRCEngines = array( 'eventbus' => 'EventBusRCFeedEngine', );
Substitute uri with the $wgEventServiceUrl, but with eventbus:// instead of http://.
Note that the protocol schema part of the uri configured in$wgRCFeeds starts with eventbus://. $wgRCEngines config are mapped from protocol schemes. However, EventServiceUrl which is used to configure EventBus configuration expects this to be a usual http:// REST endpoint. EventBusRCFeedEngine is aware of this discrepency, and replaces the eventbus:// in the uri with http:// when configuring its EventBus instance.
EventBus is licensed under the GNU General Public License 2.0 or any later version. You may obtain a copy of this license at http://www.gnu.org/copyleft/gpl.html.