Liking cljdoc? Tell your friends :D

trivial-kafka-async.core


consumer!clj

(consumer! {:keys [topic properties duration] :or {duration 100}})

Receives a map of a topic and the java properties. Returns a channel, which will be populated with individual messages from the kafka topic.

Receives a map of a topic and the java properties.
Returns a channel, which will be populated with individual messages from the kafka topic.
raw docstring

consumer-batch!clj

(consumer-batch! {:keys [topic properties duration] :or {duration 100}})

Receives a map of a topic and the java properties. Returns a channel, which will be populated with a list of messages from the kafka topic. Each list of messages corresponds to a iteration of the consumer poll.

Receives a map of a topic and the java properties.
Returns a channel, which will be populated with a list of messages from the kafka topic.
Each list of messages corresponds to a iteration of the consumer poll.
raw docstring

producer!clj

(producer! {:keys [topic properties flush?] :or {flush? true}})

Receives a map of a topic and the java properties. Returns a channel that will be consumed and sent each individual message to kafka in a different thread.

Receives a map of a topic and the java properties.
Returns a channel that will be consumed and sent each individual message to kafka in a different thread.
raw docstring

worker!clj

(worker! channel f)
(worker! channel f extra)

Execute a function f each time a message is received at the channel. Checks if a exception is passed in a channel, if it is f will not be applied and the exception will be logged. An optional list of extra arguments can be passed to worker! and will be passed to f as the second argument.

Execute a function f each time a message is received at the channel.
Checks if a exception is passed in a channel, if it is f will not be applied and the exception will be logged.
An optional list of extra arguments can be passed to `worker!` and will be passed to `f` as the second argument.
raw docstring

worker-batch!clj

(worker-batch! channel n f)
(worker-batch! channel n f extra)

Execute a function f for every n messages received at the channel. Checks if a exception is passed in a channel, if it is f will not be applied and the exception will be logged. An optional extra argument can be passed to worker-batch! and will be passed to f as the second argument.

Execute a function `f` for every `n` messages received at the channel.
Checks if a exception is passed in a channel, if it is f will not be applied and the exception will be logged.
An optional extra argument can be passed to `worker-batch!` and will be passed to `f` as the second argument.
raw docstring

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

× close