-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathslipstream.yml
72 lines (66 loc) · 2.34 KB
/
slipstream.yml
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
#
# This is an example of a slipstream configuration.
#
# It is used for testing, but also serves documentation
---
kafka:
# The configuration is passed directly through to librdkafka
#
# https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md
bootstrap.servers: localhost:9092
group.id: 'slipstream'
# The schemas must be a directory containing .json or .yml files which
# describe JSON schemas
schemas: 'schemas.d'
topics:
- name: 'test'
# Using the `key` allows JSON messages to self-describe the schema
# with which they should be validated.
#
# This will *only* be valid for a root key. This is to avoid the
# need to do extra parsing and searching within each message.
schema:
key: '$id'
# THe routing configuration can be used to route the messages after
# validation to additional Kafka topics for consumption.
#
# Using the `$name` placeholder will substitute the originating
# topic's name, for example valid messages on "test" will be routed
# to "test.valid"
routing:
# Passed validation
valid: '$name.valid'
# Failed the defined schema
invalid: '$name.invalid'
# Could not be deserialized as JSON
error: '$name.error'
# Slipstream topic mappings can be chained to allow for secondary schema
# validation, i.e. "this message wasn't valid for v2 of the spec, what about
# v1?"
#
- name: 'test.invalid'
schema:
path: 'some-legacy-schema.yml'
routing:
valid: 'tests-v1'
- name: 'pings'
# When using the `path` key for the schema, all messages in the
# topic will be validated against the specific schema definition
schema:
path: 'pings/v1.yml'
routing:
# The keys under `routing` are optional, omitted entries will
# result in messages not being routed under certain conditions
invalid: 'invalid-pings'
- name: 'other'
schema:
path: 'other.yml'
routing:
valid: '$name.valid'
# All internal settings are optional, and should only be changed by
# power-users, i.e. those who likely have read the source code to slipstream :)
internal:
# Size of the internal buffer for queueing messages to the librdkafka
# producer. This is _not_ the same as the librdkafka internal buffer and only
# serves to pass processed messages between worker tasks.
sendbuffer: 1024