On http in node we are sending a request to the MQTT broker using mqtt out node and on MQTT in node response we need to trigger the HTTP response.
we tried with below but doesnt seem to work,
can anyone please help me with this
[{"id":"fddbf80b980767ff","type":"mqtt in","z":"5e7c412c8b50ab24","name":"","topic":"in/topic1","qos":"2","datatype":"auto","broker":"9dcfb076.0d327","nl":false,"rap":true,"rh":0,"inputs":0,"x":180,"y":260,"wires":[["725f7f15da51da50"]]},{"id":"f10aa70b8d84e061","type":"mqtt out","z":"5e7c412c8b50ab24","name":"","topic":"out/topic1","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"9dcfb076.0d327","x":580,"y":100,"wires":[]},{"id":"aabd5ea787546e9d","type":"http in","z":"5e7c412c8b50ab24","name":"","url":"/getdata","method":"get","upload":false,"swaggerDoc":"","x":200,"y":100,"wires":[["f10aa70b8d84e061","725f7f15da51da50"]]},{"id":"2861f2a6e8074be2","type":"http response","z":"5e7c412c8b50ab24","name":"","statusCode":"","headers":{},"x":770,"y":180,"wires":[]},{"id":"725f7f15da51da50","type":"function","z":"5e7c412c8b50ab24","name":"","func":"if(msg.payload != null) \n{\n msg.statusCode=200;\n}\nelse\n{\n msg.statusCode=500;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":520,"y":180,"wires":[["2861f2a6e8074be2"]]},{"id":"eb7f4d41c1652939","type":"comment","z":"5e7c412c8b50ab24","name":"","info":"On recieveing the HTTP request and its respective respone from MQTT in node , \nwe want to send the HTTP response code as 200 with some payload data or else 500\n\nand this process should repeat for all the http in requests","x":510,"y":240,"wires":[]},{"id":"9dcfb076.0d327","type":"mqtt-broker","name":"local","broker":"127.0.0.1","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"5","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"true","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""}]