cljka.core

consume!

(consume! environment topic from)

Starts a new consumer on the specified topic from the specified point. The ‘from’ parameter can be any of :start, :end, a numeric offset. All partitions are consumed from the specified point. Alternatively, ‘from’ can be used to focus the consumer on specific partitions on the topic - in which case it will be a collection of partition/from pairs e.g. [0 :start 1 1412].

get-group-offsets

(get-group-offsets environment topic consumer-group)

Gets the offsets for the specified consumer group on the given topic.

get-kafka-config

(get-kafka-config environment topic)

Returns the configuration map that will be used in cljka operations for the specified environment and topic. Useful for diagnosing problems.

get-lag

(get-lag environment topic consumer-group)

Gets the lag for the specified consumer group on the given topic.

get-offset-at

(get-offset-at environment topic partition at)

Gets the offset for the specified partition of a topic at a particular point in time.

at can either be :start, :end or an epoch millis long (representing an epoch time). If epoch millis are specified then the offset will be the first one with a timestamp after the specified point in time - -1 will be returned if such offset can be found.

get-offsets-at

(get-offsets-at environment topic at)

Gets the offsets for the partitions of a topic at a particular point in time.

at can either be :start, :end or an epoch millis long (representing an epoch time). If epoch millis are specified then the offset for each partition will be the first one with a timestamp after the specified point in time - -1 will be returned if such offset can be found.

get-partitions

(get-partitions environment topic)

Gets a vector of partitions available for the given topic.

get-topics

(get-topics environment)

Lists all topics in alphabetical order.

set-config!

(set-config! new-config)

set-group-offset!

(set-group-offset! environment topic partition consumer-group offset)

Sets the group offset on a single partition to the specified value.

offset can either be :start, :end or a number representing a specific offset

set-group-offsets!

(set-group-offsets! environment topic consumer-group partition-offsets)

Sets the group offset on all partitions to the specified value.

partition-offsets is a vector of partition->offset pairs where each offset is a numeric offset.