chameleonbr / node-red-contrib-redis

Node RED client for Redis with pub/sub, list, lua scripting and other commands support.
MIT License
46 stars 40 forks source link

Redis-In topics which contain spaces #22

Closed katterfelto closed 4 years ago

katterfelto commented 4 years ago

Using a topic string like 'Test Tag' in a Redis-In node with the command set to Subscribe does not receive any updates. The same topic used in a Redis-Out node set to publish does successfully pass on the payload to the Redis broker.

I am using v 1.3.1 of the project

The following flow demonstrates my problem.

[{"id":"638968e0.083598","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"1fbb590e.389d77","type":"inject","z":"638968e0.083598","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":220,"wires":[["65326432.9ba58c","91a753d6.cb001"]]},{"id":"65326432.9ba58c","type":"redis-out","z":"638968e0.083598","server":"4b31b18f.1f534","command":"publish","name":"","topic":"Test Tag","x":460,"y":220,"wires":[]},{"id":"91a753d6.cb001","type":"debug","z":"638968e0.083598","name":"REDIS","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":450,"y":160,"wires":[]},{"id":"7bdc7d1f.1684a4","type":"redis-in","z":"638968e0.083598","server":"4b31b18f.1f534","command":"subscribe","name":"","topic":"Test Tag","timeout":0,"x":200,"y":160,"wires":[["91a753d6.cb001"]]},{"id":"4b31b18f.1f534","type":"redis-config","z":"","name":"","options":"{}","cluster":false,"optionsType":"json"}]

katterfelto commented 4 years ago

I've creates pull request #23 which makes the RedisIn node Topic field consistent with the related nodes by treating the contents of the topic field as a single topic.