Interface WikimediaStreamOptions

interface WikimediaStreamOptions {
    autoStart?: boolean;
    enableCanary?: boolean;
    headers?: object;
    https?: object;
    lastEventId?: WikimediaStreamLastEventID[];
    proxy?: string;
    rejectUnauthorized?: boolean;
    reopenOnClose?: boolean;
    since?: string;
    withCredentials?: boolean;
}

Hierarchy

  • EventSourceInitDict
    • WikimediaStreamOptions

Properties

autoStart?: boolean

Whether to start after instantiation or not.

Default

true
enableCanary?: boolean

Enable listening to canary events. Canary events are sent multiple times an hour to ensure that streams are not broken. They are filtered by default to avoid "fake" events from being received by a client.

See

Default

false
headers?: object
https?: object

Specifies the Kafka topics, partitions and offsets from which to begin streaming. You may not specify topics that are not configured to be part of this stream endpoint.

If a timestamp is given, the stream will start from an event closest to the timestamp provided. If an offset is provided, the stream will start from the exact event at the provided offset. If both are provided, offset takes precedence.

The last event ID received by the stream will always take precedence. If you want to continue a stream with a custom last event ID after this stream has already received events, instantiate a new stream.

See

https://github.com/wikimedia/kafkasse#readme

Example

`[{topic: datacenter1.topic, partition: 0, offset: 12345}, ...]`
proxy?: string
rejectUnauthorized?: boolean
reopenOnClose?: boolean

Whether the stream should automatically be reopened if it closes due to an error or a periodic disconnect (standard for Wikimedia Foundation streams).

Default

true
since?: string

If given, this timestamp will be used as the historical starting position in each the requested streams. since should either be an integer UTC milliseconds unix epoch timestamp, or a string timestamp parseable by Date.parse(). If the timestamp given does not have any corresponding offsets, it will be ignored, and the data will begin streaming from the latest position in the stream. This parameter is ignored if Last-Event-ID is set with offsets (or timestamps) for individual topic partition assignments, e.g. when resuming after a disconnect.

NOTE: Historical timestamp assignment is not supported indefinitely. Depending on backend stream configuration, will likely be only one or a few weeks.

withCredentials?: boolean

Generated using TypeDoc