Protocol defining the required functions of a producer implementation
Protocol defining the required functions of a producer implementation
(close! this timeout)
Close this client
Close this client
(flush! this)
Ensure that produced messages are flushed to their specified topics.
Ensure that produced messages are flushed to their specified topics.
(partitions-for this topic)
Protocol to retrive partition information for a given topic The resulting data structure looks like the following, sourced from kafka's PartitionInfo class:
{:topic "the-topic" :partition 0 :isr [{:host "replica1.my-kafka.com" :id 0 :port 9092}] :leader {:host "replica1.my-kafka.com" :id 0 :port 9092} :replicas [{:host "replica1.my-kafka.com" :id 0 :port 9092}]}
Protocol to retrive partition information for a given topic The resulting data structure looks like the following, sourced from kafka's PartitionInfo class: {:topic "the-topic" :partition 0 :isr [{:host "replica1.my-kafka.com" :id 0 :port 9092}] :leader {:host "replica1.my-kafka.com" :id 0 :port 9092} :replicas [{:host "replica1.my-kafka.com" :id 0 :port 9092}]}
(send! this record)
Produce a record on a topic.
When using the single arity version, a map
with the following keys is expected:
:key
, :topic
, :partition
, and :value
.
:partition
is not required
Produce a record on a topic. When using the single arity version, a map with the following keys is expected: `:key`, `:topic`, `:partition`, and `:value`. `:partition` is not required
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 |