New to MQTT and Node Red.
What I want to achieve is a simple flow that takes an input and based on a simple value (ON/OFF) push a new message to another queue.
So after your MQTT In node you want to change the msg.payload to be something else depending what the value is.
So you could do this in a function node where you can write Javascript
Or you can do it with a selection of the nodes that come with Node-RED
step 1: Use a switch node to have two different paths for if msg.payload is "ON" or "OFF"
step 2 : Then use a change node on each of the two outputs from your switch node to change msg.payload to what you want your output to be
step 3 : wire the outputs from both the change nodes to a MQTT out node
A message comes in via your MQTT node, gets sent down one of the two paths by the switch node, gets the msg.payload bit of the message changed and then gets sent out as a MQTT message.
Here's an example of the change node to get you started which you can import