Liking cljdoc? Tell your friends :D

jackdaw.test.commands.write


command-mapclj

source

create-messageclj

(create-message topic-map message opts)

Builds a producer-record map from message for topic-map: derives the key (via :key-fn, default :id) and the partition (via :partition-fn, default Kafka's), with explicit :key/:partition/:key-fn/:partition-fn in opts overriding the topic map. Throws if the resulting partition is out of range.

Builds a producer-record map from `message` for `topic-map`: derives the key
(via `:key-fn`, default `:id`) and the partition (via `:partition-fn`, default
Kafka's), with explicit `:key`/`:partition`/`:key-fn`/`:partition-fn` in `opts`
overriding the topic map. Throws if the resulting partition is out of range.
sourceraw docstring

default-partition-fnclj

(default-partition-fn topic-map _topic-name k _v partition-count)

Returns the partition (0..partition-count) for key k on topic-map, using Kafka's default partitioning strategy.

Returns the partition (0..partition-count) for key `k` on `topic-map`, using
Kafka's default partitioning strategy.
sourceraw docstring

do-writeclj

(do-write machine topic-name message)
(do-write machine topic-name message opts)

Produces message to topic-name through the test machine's producer and waits up to opts's :timeout ms (default 1000) for the ack. Returns an :error map for an unknown topic or a timeout.

Produces `message` to `topic-name` through the test machine's producer and
waits up to `opts`'s `:timeout` ms (default 1000) for the ack. Returns an
`:error` map for an unknown topic or a timeout.
sourceraw docstring

handle-write-cmdclj

(handle-write-cmd machine params)

Handler for the :write! command; applies do-write to machine and the [topic-name message opts?] in params.

Handler for the `:write!` command; applies `do-write` to `machine` and the
`[topic-name message opts?]` in `params`.
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