Skip to content
stormbreakerbetadocs
v0.1.1next
GitHub

stormbreaker-kafka

View .mdOpen in Claude

Load through a topic: a stream’s records become whole Kafka records (key, value, headers), published at a declared arrival rate through a Kafka service axx’s kafka pack declared, serialized as its publish steps serialize: Avro, with the Schema Registry, when the record’s factory is Avro; text otherwise. Builds on stormbreaker-core (list it in axx-packs.yaml): binding a stream declares the identities it will create before anything is published.

List it in the project’s axx-packs.yaml, with the packs it builds on:

axx-packs.yaml
packs:
- kafka
- github.com/nimbusxr/stormbreaker/packs/core@v0.1.0
- github.com/nimbusxr/stormbreaker/packs/kafka@v0.1.0

In axx.yaml, under packs.stormbreaker-kafka:

Setting What it is
maxDrift How late events may leave their due time, for five seconds in a row, before the publish stops, failing because the driver is not keeping up (default 1s; off turns it off).
maxInFlight How many events may be in flight before the publish stops, failing because the cluster is not keeping up (default 50000).
Given the {word} stream of {word} kafka events[[ on the {word} kafka service]]

Bind a stream (<name>.stream.yaml) to a topic: each record is an event, its data the value. Binding declares every identity the stream will create, at the topic, before anything is published.

Given the scans stream of depot-scans kafka events
Given the {word} stream kafka event keys are the {word} metadata

Take each event’s key from a metadata entry of its record. Without one, an event’s key is its record’s first identity.

Given the {word} stream kafka event headers are the {word} metadata

Take each event’s headers from a metadata entry of its record: a map, by header name.

Given the {word} kafka events are identified by the payload {word}

Declare the identities in the payloads of the events drafted by hand for a topic before each is published: the values at the JSON paths given, comma-separated.

Given the {word} kafka events are identified by the header {word}

Declare the identities in a header of the events drafted by hand for a topic before each is published.

When the {word} stream is published at {int} events per second

Publish the stream’s events open-model: event i is due at i/rate seconds, however the ones before it are doing.

When the scans stream is published at 25 events per second
When the {word} stream is published using schema {filepath} at {int} events per second

Publish the stream’s events as values of an Avro schema, whatever their factory says.

When the scans stream is published using schema schemas/depot-scan.avsc at 25 events per second
Then the {word} consumer group catches up on the {word} topic within {duration}[[ on the {word} kafka service]]

Wait until a consumer group has consumed everything published to a topic (its lag is zero on every partition), so that what is downstream has settled before it is judged, and before cleanup. Fails when it has not caught up in time.

Then the tracking consumer group catches up on the parcel-events topic within 60s
Then the publish completes with no failed events

Check that no event of the last publish failed.

Then the publish completes with no failed events