franzy.clients.consumer.protocols

AutomaticPartitionAssignor

protocol

Automatically assigns topic partitions to consumers.

members

clear-subscriptions!

(clear-subscriptions! this)

partition-subscriptions

(partition-subscriptions this)

subscribe-to-partitions!

(subscribe-to-partitions! this topics)(subscribe-to-partitions! this topics opts)

FranzPartitionAssignor

protocol

Protocol used for implementors that need a specialized algorithm for assigning partitions to Kafka. Example strategies include by range or round-robin. See franzy.clients.consumer.partitioners examples.

members

assign-partition!

(assign-partition! this partitions-per-topic subscriptions)

partition-assigned

(partition-assigned this assignment)

partition-assignor-name

(partition-assignor-name this)

partition-subscription

(partition-subscription this topics)

FranzyConsumer

protocol

Protocol for implementing a Kafka consumer.

For more details regarding Kafka Consumers, see: https://kafka.apache.org/090/javadoc/org/apache/kafka/clients/consumer/Consumer.html

For an example of the Java implementation of this interface for Kafka 0.9 and above, see: https://kafka.apache.org/090/javadoc/index.html?org/apache/kafka/clients/consumer/KafkaConsumer.html

members

pause!

(pause! this topic-partitions)

poll!

(poll! this)(poll! this opts)

resume!

(resume! this topic-partitions)

wakeup!

(wakeup! this)

KafkaConsumerRecords

protocol

Protocol for behaviors of Kafka result sets (ConsumerRecords)

members

record-count

(record-count this)

record-partitions

(record-partitions this)

records-by-topic

(records-by-topic this topic)

records-by-topic-partition

(records-by-topic-partition this topic partition)(records-by-topic-partition this topic-partition)

ManualPartitionAssignor

protocol

Manually assigns topic partitions to consumers.

members

assign-partitions!

(assign-partitions! this topic-partitions)

clear-partition-assignments!

(clear-partition-assignments! this)

OffsetCommiter

protocol

Commits Kafka offsets, typically to Kafka itself or a highly reliable, fast datastore. For example, an implementor may choose with great reservation to commit to Zookeeper. Then divorce. One day someone will appreciate that you can commit.

members

commit-offsets-async!

(commit-offsets-async! this)(commit-offsets-async! this opts)(commit-offsets-async! this offsets opts)

commit-offsets-sync!

(commit-offsets-sync! this)(commit-offsets-sync! this offsets)

committed-offsets

(committed-offsets this topic-partition)

PartitionAssignable

protocol

Capable of being assigned, and thus auditing assigned partitions.

members

assigned-partitions

(assigned-partitions this)

SeekableLog

protocol

Protocol for a log, such as Kafka that is positionally seekable.

members

next-offset

(next-offset this topic-partition)

seek-to-beginning-offset!

(seek-to-beginning-offset! this topic-partitions)

seek-to-end-offset!

(seek-to-end-offset! this topic-partitions)

seek-to-offset!

(seek-to-offset! this topic-partition offset)