I've been working with MQTT for a while, but I'm a newbie in Kafka. I'm dealing with a scenario in which N MQTT clients are publishing messages on M topics, where N and M can freely range from half a dozen to several hundred. They publish their messages on dynamically generated topics, therefore I don't know them a priori. I'm using Kafka Connect to ingest these messages into Kafka where they will undergo processing using KSQL. However, it looks like all of the incoming messages are getting stored in the same Kafka topic, the one that I can specify in the Connect configuration file. Therefore, even if I can subscribe to "#" in order to get all of the incoming MQTT messages into Kafka, they're all going to be stored in the same Kafka topic. I've been studying SMTs and specifically RegexRouter, but I can't figure out how to make it work. I also know someone suggests running multiple instances of Connect, and handle each topic separately, but what if the number nor the format of the topics are known a priori? I'd just need a 1:1 mapping between the original MQTT topic and the corresponding Kafka topic. Same name. Is there a way?
e.g. MQTT message published on "home/groundfloor/temp" goes into Kafka under "home/groundfloor/temp"
Input messages are very simple strings. Any help or hint would be appreciated! Thanks