ConsumerStrategy Contract — Kafka Consumer Providers
ConsumerStrategy
is the contract for Kafka Consumer providers that can create a Kafka Consumer given Kafka parameters.
1 2 3 4 5 6 7 8 9 |
package org.apache.spark.sql.kafka010 sealed trait ConsumerStrategy { def createConsumer(kafkaParams: ju.Map[String, Object]): Consumer[Array[Byte], Array[Byte]] } |
Property | Description |
---|---|
|
Creates a Kafka Consumer (of keys and values of type Used exclusively when |
ConsumerStrategy | createConsumer | ||
---|---|---|---|
|
Uses KafkaConsumer.assign(Collection<TopicPartition> partitions) |
||
|
|||
|
Uses KafkaConsumer.subscribe(Pattern pattern, ConsumerRebalanceListener listener) with
|
Note
|
ConsumerStrategy is a Scala sealed trait which means that all the implementations are in the same compilation unit (a single file).
|