In Node-Red, I would like to be able to send a message and wait for its response using MQTT, in between an HTTP input node and a response one. I think a picture is more relevant to explain this:
The problem is an HTTP response node has to be directly linked to an input one somehow, so I thought of saving the whole message in context after receiving an HTTP input, then restore it before sending the response. The problem is that apparently, the structure of the message is circular, hence I can't directly convert it to a string, to store it in context.
I've tried different things to solve this issue (I had a look at this: JSON.stringify, avoid TypeError: Converting circular structure to JSON and I tried using the circular-json module, neither of which work).