The issue I face is that the module requires that the data you receive via SUBSCRIBE/PSUBSCRIBE or B[L|R]POP be in JSON format. If a message arrives from the redis server that is not in JSON format redis.js crashes and takes down the node-red server.
I propose that the message handlers drop this expectation. Instead simply put the message from redis in the payload as received and let the flow designers use node-red JSON nodes to convert message payloads if needed. The changes below stopped the crashing for me:
I haven't tried publishing anything with node-red-contrib-redis yet, but I expect a symmetrical assumption about JSON encoding exist. Similarly, I propose that you allow the flow designer to use JSON node-red nodes to format message payloads as JSON if they need this conversion, otherwise simply publish/push the message payload as received.
First off, get module! It's just what I needed.
The issue I face is that the module requires that the data you receive via SUBSCRIBE/PSUBSCRIBE or B[L|R]POP be in JSON format. If a message arrives from the redis server that is not in JSON format redis.js crashes and takes down the node-red server.
I propose that the message handlers drop this expectation. Instead simply put the message from redis in the payload as received and let the flow designers use node-red JSON nodes to convert message payloads if needed. The changes below stopped the crashing for me:
I haven't tried publishing anything with node-red-contrib-redis yet, but I expect a symmetrical assumption about JSON encoding exist. Similarly, I propose that you allow the flow designer to use JSON node-red nodes to format message payloads as JSON if they need this conversion, otherwise simply publish/push the message payload as received.
Again, thanks for the great node-red capability!