HI All,

I am wondering How to read from multiple kafka topics using structured
streaming (code below)? I googled prior to asking this question and I see
responses related to Dstreams but not structured streams. Is it possible to
read multiple topics using the same spark structured stream?

sparkSession.readStream()
        .format("kafka")
        .option("kafka.bootstrap.servers", "localhost:9092")
        .option("subscribe", "hello1")
        .option("startingOffsets", "earliest")
        .option("failOnDataLoss", "false")
        .load();


Thanks!

Reply via email to