I am collecting metrics via the mqtt_consumer input and am wondering if I have this set up in an optimal way. It seems to me this results in a database table with lots of gaps.
I think the simplest way to get what you want is to make another instance of the mqtt_consumer plugin, but since you asked for alternatives, here are two ways:
As @reimda already said, i would also go for a processors plugin in Telegraf.
If you need any help, please provide the actual snippet of your mqtt input plugin config and a short snippet of your collected data in influx line protocol format.