No, that is not quite right
See example here: Dynamic MQTT node's "actions->connect" guidance needed - #2 by Steve-Mcl