Hi
I am trying to read multiple topics from the MQTT broker using [[inputs.mqtt_consumer]] but I don’t want to read all the topics from the broker using topics = ["#"].
like this, I have hundreds of topics that have the data of multiple devices.
Now, I want to process the data from the topic which contains ReportCumKpi and ReportNonCumKpi and exclude everything.
I tried using wildcard + and # but I am not able to exclude other topics.
Is there any way I can exclude the rest of the topics and process interesting topics?
I have followed this blog as well but I am not able to identify the topics of my interest.
In short + and # are the primary wildcards supported by most brokers conforming to the MQTT standard. Your other option is to subscribe a wider range of topics:
Hi @Ravikant_Gautam,
Based on your topic names this is not possible. Topic hierarchy is defined by / . In your case . does not confirm to the MQTT specification that I know of. You would have to look at post-processing to filter. Perhaps through the Starlark processor plugin.