Specify a fixed collection of partitions.
Subscribe allows you to subscribe to a fixed collection of topics.
Use a regex to specify topics of interest.
Subscribe to a fixed collection of topics.
This class is useful in order to investigate infamous Spark-Kafka bugs pre 2.4 https://github.com/apache/spark/pull/21983/files https://issues.apache.org/jira/browse/SPARK-23636
Subscribe allows you to subscribe to a fixed collection of topics. SubscribePattern allows you to use a regex to specify topics of interest. Note that unlike the 0.8 integration, using Subscribe or SubscribePattern should respond to adding partitions during a running stream. Finally, Assign allows you to specify a fixed collection of partitions. All three strategies have overloaded constructors that allow you to specify the starting offset for a particular partition.