OK, now we have some clarity. When you talk about tags you mean messages containing data for a tag, where the tag id is in msg.payload.tagName.
Do you mean you want to dynamically configure an MQTT In node to subscribe to a particular topic?
If so then you can do that via dynamic subscription as described in the help text for the MQTT node. This post gives examples of how to use it Dynamic MQTT node's "actions->connect" guidance needed