Liking cljdoc? Tell your friends :D

jackdaw.streams.mock

Mocks for testing kafka streams.

Mocks for testing kafka streams.
raw docstring

build-driverclj

(build-driver f)

Builds a TopologyTestDriver by applying f to a fresh streams-builder and compiling the resulting topology.

Builds a TopologyTestDriver by applying `f` to a fresh streams-builder and
compiling the resulting topology.
sourceraw docstring

build-topology-driverclj

(build-topology-driver f)

Builds a TopologyTestDriver by applying f to a fresh low-level Topology.

Builds a TopologyTestDriver by applying `f` to a fresh low-level `Topology`.
sourceraw docstring

consumeclj

(consume test-driver {:keys [topic-name key-serde value-serde]})

Reads and datafies the next available record from topic-config's output topic on the mock test-driver, or returns nil if none is ready.

Reads and datafies the next available record from `topic-config`'s output
topic on the mock `test-driver`, or returns nil if none is ready.
sourceraw docstring

get-keyvalsclj

(get-keyvals test-driver topic-config)

Drains topic-config on the mock test-driver, returning a sequence of [key value] pairs.

Drains `topic-config` on the mock `test-driver`, returning a sequence of
`[key value]` pairs.
sourceraw docstring

get-recordsclj

(get-records test-driver topic-config)

Drains topic-config on the mock test-driver, returning a sequence of full datafied records (the same as repeatedly-consume).

Drains `topic-config` on the mock `test-driver`, returning a sequence of full
datafied records (the same as `repeatedly-consume`).
sourceraw docstring

producerclj

(producer test-driver {:keys [topic-name key-serde value-serde]})

Returns a function which can be used to publish data to a topic for the topology test driver

Returns a function which can be used to publish data to a topic for the
topology test driver
sourceraw docstring

publishclj

(publish test-driver topic-config k v)
(publish test-driver topic-config time-ms k v)

Pipes a single record with key k and value v (optionally at time-ms) into topic-config's topic on the mock test-driver.

Pipes a single record with key `k` and value `v` (optionally at `time-ms`)
into `topic-config`'s topic on the mock `test-driver`.
sourceraw docstring

repeatedly-consumeclj

(repeatedly-consume test-driver topic-config)

Lazily consumes from topic-config on the mock test-driver until the output topic is drained, returning a sequence of datafied records.

Lazily consumes from `topic-config` on the mock `test-driver` until the output
topic is drained, returning a sequence of datafied records.
sourceraw docstring

streams-builder->test-driverclj

(streams-builder->test-driver streams-builder)

Given the jackdaw streams builder, return a builds the described topology and returns a topology test driver for that topology

Given the jackdaw streams builder, return a builds the described topology
and returns a topology test driver for that topology
sourceraw docstring

topicclj

(topic topic-name)

Helper to create a topic.

Helper to create a topic.
sourceraw docstring

topology->test-driverclj

(topology->test-driver topology)

Given a kafka streams topology, return a topology test driver for it

Given a kafka streams topology, return a topology test driver for it
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close