forked from wikimedia/mediawiki-services-eventstreams
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.dev.yaml
More file actions
126 lines (110 loc) · 5.3 KB
/
config.dev.yaml
File metadata and controls
126 lines (110 loc) · 5.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# Number of worker processes to spawn.
# Set to 0 to run everything in a single process without clustering.
# Use 'ncpu' to run as many workers as there are CPU units
num_workers: 0
# Log error messages and gracefully restart a worker if v8 reports that it
# uses more heap (note: not RSS) than this many mb.
worker_heap_limit_mb: 250
# Logger info
logging:
level: debug
streams:
- type: debug
# streams:
# # Use gelf-stream -> logstash
# - type: gelf
# host: logstash1003.eqiad.wmnet
# port: 12201
# metrics:
# - type: prometheus
# port: 9102
services:
- name: eventstreams
# a relative path or the name of an npm package, if different from name
module: ./app.js
# optionally, a version constraint of the npm package
# version: ^0.4.0
# per-service config
conf:
port: 8092
# interface: localhost # uncomment to only listen on localhost
# more per-service config settings
# the location of the spec, defaults to spec.yaml if not specified
spec: ./spec.yaml
# allow cross-domain requests to the API (default '*')
cors: '*'
# If enabled, a HTML based stream GUI will be made available at /v2/ui.
# Defaults to true if undefined.
#stream_ui_enabled: true
# Connection limiting. EventStreams connections are
# expected to be long lived, so we can't use typical
# connections per second type ratelimiting. Instead,
# we limit the number of connections per X-Client-IP.
# client_ip_connection_limit: 2
# A URI from which 'stream configuration' will be fetched.
#
# The object returned by this URI should map a stream name to its config settings,
# which must include topics. If schema_title is set, it will be mentioned
# in the generated OpenAPI spec.
#
stream_config_uri: ./stream-config.yaml
# OR:
#stream_config_uri: https://meta.wikimedia.org/w/api.php?action=streamconfigs
# If provided, these options will be passed when opening stream_config_uri
# for reading. If stream_config_uri is a local file path, fs.readFile options should be
# given. If stream_config_uri is a remote http URI, preq.get options should be used.
#stream_config_uri_options: {'headers': {'Host': 'streamconfig.service.org'}}
# If set, the stream configs are expected to live in a subobject
# of the result object returned from stream_config_uri. The stream
# configs object will be extracted at this path.
# This should be a path string that Lodash#get understands.
#stream_config_object_path: 'streams'
# How long in seconds stream configs live in cache before being recached.
# 0 or unset means no expiration.
#stream_config_ttl: 60
# Default stream config settings to apply to the configs fetched from stream_config_uri.
# EventStreams uses some extra settings:
# - stream_aliases
# An array of stream route aliases from which to allow subscription to the stream.
# You might use this if you want to expose a stream at an additional name
# than its canonical stream name.
# - description
# Will be added to the OpenAPI spec's description of the stream route.
# - $schema
# If set, will be used to augmment the OpenAPI spec's response schema and examples.
#stream_config_defaults:
# mediawiki.page-create:
# stream_aliases: [page-create]
# description: |-
# mediawiki.page-create events. This page create stream is just the first revision create event for each page. As such, it reuses the mediawiki/revision/create schema.
# mediawiki.revision-create:
# stream_aliases: [revision-create]
# description: |-
# mediawiki.revision-create events.
# If set, these URIs will be prepended to any relative schema URI
# extracted from the $schema stream config setting, or the URI constructed
# using the schema_title stream config setting.. The resulting URLs will
# be searched until a schema is found. Change this
# to match paths to your schema repositories.
#schema_base_uris: [
# https://schema.wikimedia.org/repositories/primary/jsonschema,
# https://schema.wikimedia.org/repositories/secondary/jsonschema
# ]
# If provided, these options will be passed when opening schema URIs.
# for reading. If a schema URI is a local file path, fs.readFile options should be
# given. If a schema URI is a remote http URI, preq.get options should be used.
#schema_uri_options: {'headers': {'Host': 'schema.service.org'}}
# If given, and no $schema is found in a stream config, a schema URI will
# attempt to be constructed a /${schema_title}/${schema_latest_version}.
# If this is not set, no schema URI will be inferred using schema_title.
#schema_latest_version: 'latest'
# Explicit list of allowed streams. If this is not set, all streams fetched from
# the stream_config_uri will be exposed. Otherwise, only streams in this list
# will be exposed.
# allowed_streams:
# - mediawiki.page-create
# - mediawiki.revision-create
# kafka configs go here.
kafka:
metadata.broker.list: 'localhost:9092'
statistics.interval.ms: 5000