Skip to content

ConsumerStrategy

ConsumerStrategy is an abstraction of consumer strategies of which partitions to read records from.

Contract

Assigned TopicPartitions

assignedTopicPartitions(
  admin: Admin): Set[TopicPartition]

Assigned TopicPartitions (Apache Kafka)

Used when:

Creating Kafka Consumer

createConsumer(
  kafkaParams: ju.Map[String, Object]): Consumer[Array[Byte], Array[Byte]]

Creates a Consumer (Apache Kafka)

Used when:

Implementations

Sealed Trait

ConsumerStrategy is a Scala sealed trait which means that all of the implementations are in the same compilation unit (a single file).

Learn more in the Scala Language Specification.