Liking cljdoc? Tell your friends :D

cddr.kafka.test.transports.kafka


build-recordclj

(build-record m)

Builds a Kafka Producer and assoc it onto the message map

Builds a Kafka Producer and assoc it onto the message map
raw docstring

close-consumerclj

(close-consumer consumer)

consumerclj

(consumer kafka-config topic-metadata deserializers)

Creates an asynchronous Kafka Consumer of all topics defined in the supplied topic-metadata

Puts all messages on the channel in the returned response. It is the responsibility of the caller to arrange for the read the channel to be read by some other process.

Must be closed with close-consumer when no longer required

Creates an asynchronous Kafka Consumer of all topics defined in the
supplied `topic-metadata`

Puts all messages on the channel in the returned response. It is the
responsibility of the caller to arrange for the read the channel to
be read by some other process.

Must be closed with `close-consumer` when no longer required
raw docstring

deliver-ackclj

(deliver-ack ack)

Deliver the ack promise with the result of attempting to write to kafka. The default command-handler waits for this before on to the next command so the test response may indicate the success/failure of each write command.

Deliver the `ack` promise with the result of attempting to write to kafka. The
default command-handler waits for this before on to the next command so the
test response may indicate the success/failure of each write command.
raw docstring

load-assignmentsclj

(load-assignments consumer)

mk-consumer-recordclj

(mk-consumer-record consumer-record)

Clojurize the ConsumerRecord returned from consuming a kafka record

Clojurize the ConsumerRecord returned from consuming a kafka record
raw docstring

mk-producer-recordclj

(mk-producer-record {:keys [topic-name]} value)
(mk-producer-record {:keys [topic-name]} key value)
(mk-producer-record {:keys [topic-name]} partition key value)
(mk-producer-record {:keys [topic-name]} partition timestamp key value)

Creates a kafka ProducerRecord for use with send!.

Creates a kafka ProducerRecord for use with `send!`.
raw docstring

pollerclj

(poller messages)

Returns a function that takes a consumer and puts any messages retrieved by polling it onto the supplied messages channel

Returns a function that takes a consumer and puts any messages retrieved
by polling it onto the supplied `messages` channel
raw docstring

producerclj

(producer kafka-config topic-config serializers)

Creates an asynchronous kafka producer to be used by a test-machine for for injecting test messages

Creates an asynchronous kafka producer to be used by a test-machine for for
injecting test messages
raw docstring

seek-to-endclj

(seek-to-end consumer & topic-partitions)

Seeks to the end of all the partitions assigned to the given consumer and returns the updated consumer

Seeks to the end of all the partitions assigned to the given consumer
and returns the updated consumer
raw docstring

set-headersclj

(set-headers producer-record headers)

subscribeclj

(subscribe consumer topic-config)

Subscribes to specified topics

consumer should be a kafka consumer topic-config should be a sequence of topic-metadata maps

Subscribes to specified topics

`consumer` should be a kafka consumer
`topic-config` should be a sequence of topic-metadata maps
raw docstring

subscriptionclj

(subscription kafka-config topic-collection)

Subscribes to topic-collection and seeks to the end of all partitions. This is usually what you want in a testing context. It's best for the test you're trying to run now to ignore all the garbage created by previous tests.

Subscribes to `topic-collection` and seeks to the end of all partitions. This
is usually what you want in a testing context. It's best for the test you're
trying to run now to ignore all the garbage created by previous tests.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close