Sorry but that was clear as mud or I'm over tired but I'm not sure what you are doing.
When you are describing a problem is is a good idea to give an overview like
"I'm running Node-RED (v0.19.5) on a Mac. I have a DHT33 sensor being read by an arduino. I'm sending the data to the Mac using MQTT but I can't get it to work. I know that MQTT is working because I added two test flows: one that sends amsg via MQTT and one that receives MQTT msgs and the debug shows it working.
Attached is my flow (configured per the directions at How to share code or flow json)
Anyone have any suggestions?
let say i am printing number when that script is executed
Now I read that and say "Hmmm I wish he had said if he was printing the number on the mac or he is printing it with the arduino. I wonder if he is using serial to connect the arduino to the mac and what protocol he is using. And what script is he executing and how did it get started?
For what it is worth, I (and many others on the forum) have many sensors being read using WeMos's and sending the data via MQTT. I install ESPeasy on the WeMos which makes reading and sending the data very easy. I send the data to a Pi or a flow running on my Mac.