Can we subscribe to pattern of topics(Kafka) from Structured streaming

Srikanth_Gupta_
Databricks Employee
Databricks Employee
 

Srikanth_Gupta_
Databricks Employee
Databricks Employee

Yes we can using below code snippet

spark

.readStream

.format("kafka")

.option("kafka.bootstrap.servers", "host1:port1,host2:port2")

.option("subscribePattern", "topic.*")

.load()