ConsumerStrategy¶
ConsumerStrategy
is an abstraction of consumer strategies of which partitions to read records from.
Contract¶
Assigned TopicPartitions¶
assignedTopicPartitions(
admin: Admin): Set[TopicPartition]
Assigned TopicPartition
s (Apache Kafka)
Used when:
KafkaOffsetReaderAdmin
is requested to fetchPartitionOffsets, partitionsAssignedToAdmin
Creating Kafka Consumer¶
createConsumer(
kafkaParams: ju.Map[String, Object]): Consumer[Array[Byte], Array[Byte]]
Creates a Consumer
(Apache Kafka)
Used when:
KafkaOffsetReaderConsumer
is requested for a Kafka Consumer
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.
AssignStrategy
SubscribePatternStrategy
- SubscribeStrategy