(assign! consumer partitions)
Manually assign specific partitions to the consumer without group coordination.
Manually assign specific partitions to the consumer without group coordination.
(assignment consumer)
Get the set of partitions currently assigned to this consumer.
Get the set of partitions currently assigned to this consumer.
(beginning-offsets consumer partitions)
(beginning-offsets consumer partitions timeout)
Get the first offset for the given partitions.
Get the first offset for the given partitions.
(close! consumer timeout-ms)
Will block at most timeout-ms milliseconds. Will commit offsets of last poll (when auto-commit enabled). Should be called after poll returns or wakes up.
Will block at most timeout-ms milliseconds. Will commit offsets of last poll (when auto-commit enabled). Should be called after poll returns or wakes up.
(commit-callback f)
Construct a callback object for commit!
Construct a callback object for `commit!`
(consumer config)
(consumer config key-deserializer value-deserializer)
Construct the java KafkaConsumer.
Construct the java KafkaConsumer.
(end-offsets consumer partitions)
(end-offsets consumer partitions timeout)
Get the end offsets for the given partitions.
Get the end offsets for the given partitions.
(partitions-for consumer topic)
(partitions-for consumer topic timeout)
Get metadata about the partitions for a given topic.
Get metadata about the partitions for a given topic.
(poll! consumer timeout)
Fetch records. This is where auto-commit and partition reassignment happen.
Fetch records. This is where auto-commit and partition reassignment happen.
(position consumer partition)
(position consumer partition timeout)
Get the offset of the next record that will be fetched (if a record with that offset exists).
Get the offset of the next record that will be fetched (if a record with that offset exists).
(rebalance-listener assigned revoked)
(rebalance-listener assigned revoked lost)
Create a ConsumerRebalanceListener. Provide either 2 functions for assigned and revoked, or 3 for assigned, revoked and lost events. Each of assigned, revoked and lost functions receive a single parameter of type Collection<TopicPartition>.
Create a ConsumerRebalanceListener. Provide either 2 functions for assigned and revoked, or 3 for assigned, revoked and lost events. Each of assigned, revoked and lost functions receive a single parameter of type Collection<TopicPartition>.
(seek! consumer partition offset)
Overrides the fetch offsets that the consumer will use on the next poll.
Overrides the fetch offsets that the consumer will use on the next poll.
(seek-to-beginning! consumer partitions)
Seek to the first offset for each of the given partitions (Collection<TopicPartition>
)
Seek to the first offset for each of the given partitions (`Collection<TopicPartition>`)
(seek-to-end! consumer partitions)
Seek to the last offset for each of the given partitions (Collection<TopicPartition>
).
Seek to the last offset for each of the given partitions (`Collection<TopicPartition>`).
(subscribe-to-list! consumer topics)
(subscribe-to-list! consumer topics rebalance-listener)
(subscribe-to-pattern! consumer topics)
(subscribe-to-pattern! consumer topics rebalance-listener)
(subscribe-to-topic! consumer topic)
(subscribe-to-topic! consumer topic rebalance-listener)
(topic-partition topic partition)
Create a TopicPartition object, to be used with e.g seek!
Create a TopicPartition object, to be used with e.g `seek!`
(topic-partitions topic partition-numbers)
Create a TopicPartition collection for a single topic, to be used with e.g assign!
.
Create a TopicPartition collection for a single topic, to be used with e.g `assign!`.
(wakeup! consumer)
Call from any thread to release consumer from a long poll before closing.
Call from any thread to release consumer from a long poll before closing.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close