chameleonbr / node-red-contrib-redis

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

SET command writing to the wrong DB #44

Closed Josefernandez-dev closed 3 years ago

Josefernandez-dev commented 4 years ago

Hi,

I have the following issue: I have 2 Redis DB's running in two different containers, one in port 6379 and the other one in port 6380.

Everything's working fine, but I have an issue when ussing the command SET. I use SET to write in Redis at port 6380 (redis-config on my configuration) but the command is sent to the Redis DB in port 6379 (redis-pubsub on my configuration).

I'm using the same Server configuration with a Redis Out and it's writing properly to the Redis DB in port 6380 (redis-config on my configuration).

This is the server options used in the SET command:

{"host":"redis-config","port":"6380"}

It seems that the command SET is always writing to the same port, despite other port being assigned in the Server options. Could this be a bug?

And this is the docker-compose.yml:

version: '3' redis-pubsub: image: redis:latest container_name: redis-pubsub volumes:

chameleonbr commented 4 years ago

What version are you using?

Josefernandez-dev commented 4 years ago

last one, 1.3.7 node red 1.1.3

chameleonbr commented 4 years ago

Hi @Josefernandez-dev until I have time to look at your issue you can use the block option on the node, it forces the creation of a new connection specified for the configured server.

Josefernandez-dev commented 4 years ago

Hey @chameleonbr that's alright, thanks. I figured it out to make it work. Just left this open so you can check if there's something wrong with the SET command and fixed it.