Dynamically set MQTT broker configurations

Is there a way to set MQTT broker configurations like server, username and password dynamically. Maybe,we can configure these things through the input to the MQTT node, or is there any other way?

Yes, read the node help - especially msg.broker

Here is a demo of most of the help text info to Dynamic MQTT LWT birth, Close & Will Property - #2 by Steve-Mcl