我正在使用带有 Kafka 的 Spark Structured 流,并且主题被订阅为模式:
option("subscribePattern", "topic.*")
// Subscribe to a pattern
val df = spark
.readStream
.format("kafka")
.option("kafka.bootstrap.servers", "host1:port1,host2:port2")
.option("subscribePattern", "topic.*")
.load()
一旦我开始工作并列出了一个新主题topic.new_topic
,该工作就不会自动开始收听新主题,它需要重新启动。
有没有办法在不重新启动作业的情况下自动订阅新模式?
火花:3.0.0