Telegraf forming connection to MQTT broker

I am using [[inputs.mqtt]] to read the data from the ActiveMQ broker using telegraf.
I am able to read the data from the broker and able to write to InfluxDB as well.

Now suppose, I have 100 topics from which I have to read the data from only 30 topics and I have filtered those topics using the wildcard characters.

I am reading the data from 30 topics at once. So, does it mean telegraf forming 30 connections with the broker or only one connection forming with the broker and reading the data?

do we have any documentation where we can get the information on how the telegraf forms a connection to the broker?


I thin you mean mqtt_consumer!? If so, the plugin connects only once per configured instance. I.e. if you have [[inputs.mqtt_consumer]] only once in your config, you will only get one connection to the broker, registering to listen to all your 30 topics.

If you need parallel connections, you can configure multiple [[inputs.mqtt_consumer]] instances.

Does this help?

I wanted the confirmation that telegraf forms only one connection between broker and telegraf.

Thanks for help