Liking cljdoc? Tell your friends :D
Clojure only.

gregor.details.protocols.consumer


ConsumerProtocolcljprotocol

Driver interface for consumers

Driver interface for consumers

close!clj

(close! this timeout)

Close this client

Close this client

commit!clj

(commit! this)
(commit! this topic-offsets)

Commit offsets for a consumer. The topic-offsets argument must be a list of maps of the form:

{:topic     topic
 :partition partition
 :offset    offset
 :metadata  metadata}

The topic and partition tuple must be unique across the whole list.

Commit offsets for a consumer.
The topic-offsets argument must be a list of maps of the form:
```
{:topic     topic
 :partition partition
 :offset    offset
 :metadata  metadata}
```
The topic and partition tuple must be unique across the whole list.

partitions-forclj

(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}]}

poll!clj

(poll! this timeout)

Poll for new messages. Timeout in ms.

Poll for new messages. Timeout in ms.

subscribe!clj

(subscribe! this topics)

Subscribe to a topic or list of topics.

Subscribe to a topic or list of topics.

subscriptionclj

(subscription this)

Currently assigned topics

Currently assigned topics

unsubscribe!clj

(unsubscribe! this)

Unsubscribe from currently subscribed topics.

Unsubscribe from currently subscribed topics.

wakeup!clj

(wakeup! this)

Safely wake-up a consumer which may be blocking during polling.

Safely wake-up a consumer which may be blocking during polling.
sourceraw docstring

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

× close