Help:Extension:EventStreamConfig

= EventStreamConfig =

This EventStreamConfig extension provides library functions and an API endpoint for exporting event stream configuration from the  MediaWiki configuration variable.

This allows for centralized configuration of streams for both Mediawiki and external uses.


 * The EventLogging extension uses this with ResourceLoader to load configs for streams used on certain pages to dynamically configure client stream settings, like sample rate.
 * Mobile apps use the API endpoint to dynamically configure client stream settings like sample rate.
 * EventGate event intake service(s) use this to ensure that only events of a specific schema title are allowed into a stream.
 * EventBus and other server side event producers uses this to figure out which event intake service a given stream should be produced to.

MediaWiki Config
is a list of individual stream configs. Each stream config must minimally specify its  and its   name settings. In , may either be a static stream name string, or a regex that matches stream names for which the stream config should be used.

Example:

(Note:  is just an example setting)

Getting configs for a list of streams
takes a list of stream names to return configs for. The array is searched in order for the first  that matches. The return value is a map from requested stream name to the matched stream config. By default any settings in  are removed from the returned stream configs; as they are often not useful for client side configuration. The  parameter disables this behavior.

Example: