stormbreaker-kafka
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.
Add it
Section titled “Add it”List it in the project’s axx-packs.yaml, with the packs it builds on:
packs: - kafka - github.com/nimbusxr/stormbreaker/packs/core@v0.1.0 - github.com/nimbusxr/stormbreaker/packs/kafka@v0.1.0Settings
Section titled “Settings”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). |
stormbreaker.kafka.stream
Section titled “stormbreaker.kafka.stream”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 eventsstormbreaker.kafka.stream.keys
Section titled “stormbreaker.kafka.stream.keys”Given the {word} stream kafka event keys are the {word} metadataTake each event’s key from a metadata entry of its record. Without one, an event’s key is its record’s first identity.
stormbreaker.kafka.stream.headers
Section titled “stormbreaker.kafka.stream.headers”Given the {word} stream kafka event headers are the {word} metadataTake each event’s headers from a metadata entry of its record: a map, by header name.
stormbreaker.kafka.identified.payload
Section titled “stormbreaker.kafka.identified.payload”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.
stormbreaker.kafka.identified.header
Section titled “stormbreaker.kafka.identified.header”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.
stormbreaker.kafka.stream.publish
Section titled “stormbreaker.kafka.stream.publish”When the {word} stream is published at {int} events per secondPublish 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 secondstormbreaker.kafka.stream.publish.schema
Section titled “stormbreaker.kafka.stream.publish.schema”When the {word} stream is published using schema {filepath} at {int} events per secondPublish 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 secondstormbreaker.kafka.caught-up
Section titled “stormbreaker.kafka.caught-up”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 60sstormbreaker.kafka.no-failures
Section titled “stormbreaker.kafka.no-failures”Then the publish completes with no failed eventsCheck that no event of the last publish failed.
Then the publish completes with no failed events