Mocks for testing kafka streams.
Mocks for testing kafka streams.
(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.
(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`.
(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.
(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.
(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`).
(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
(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`.
(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.
(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
(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
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |