(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.
(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.
(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.
(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`.
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 |