jackdaw.client.log

Extras for `jackdaw.client` for treating topics as seqs of records.

Pretty handy for testing.

count-messages

(count-messages config topic)
Consumes all of the messages on a topic to determine the current count

log

(log consumer polling-interval-ms)(log consumer polling-interval-ms fuse-fn)
Given a consumer, returns a lazy sequence of datafied consumer records.

If fuse-fn was provided, stops after fuse-fn returns false.

log-until

(log-until consumer polling-interval-ms end-at-ms)
Given a consumer, a number of MS at which to poll and a duration,
returns a lazy sequence of datafied consumer records consumed during
that period.

Stops when current time > end-at.

log-until-inactivity

(log-until-inactivity consumer polling-interval-ms)
Given a consumer, returns a lazy sequence of datafied consumer records.

Stops when no messages are returned from poll.

wait-for-inactivity

(wait-for-inactivity config topic inactivity-ms)
Waits until no messages have been produced on the topic in the given duration.