ESP8266 "RAW" MQTT messages using the PubSub Library question

You can see some example code for pubsub here Using Node-RED as a Local Fallback Server