Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 1.52 KB

spark-sql-streaming-ConsumerStrategy.adoc

File metadata and controls

29 lines (22 loc) · 1.52 KB

ConsumerStrategy Contract for KafkaConsumer Providers

ConsumerStrategy is the contract for components that can create a KafkaConsumer using the given Kafka parameters.

createConsumer(kafkaParams: java.util.Map[String, Object]): Consumer[Array[Byte], Array[Byte]]
Table 1. Available ConsumerStrategies
ConsumerStrategy createConsumer

AssignStrategy

Uses KafkaConsumer.assign(Collection<TopicPartition> partitions)

SubscribeStrategy

Uses KafkaConsumer.subscribe(Collection<String> topics)

SubscribePatternStrategy

Tip
Refer to java.util.regex.Pattern for the format of supported topic subscription regex patterns.