Hi Salvatore,
Redis has follow bug:
If message published in cluster from eval script then it will be repeated amount of times equal to amount of slaves.
Eval script to reproduce:
redis.call('hset', 'simple', '1', '2');
redis.call('publish', 'my:{simple}', '12345');
It's worth to note that pubsub channel name should contain the same name as hash has.
for cluster with one slave per master you'll get one duplication. With two slaves you'll get two duplications and so on.
Comment From: patpatbear
I tried but failed to reproduce this issue with three-node cluster.
redis-cli -p 30003 --eval foo.lua ,
~/github/redis-5.0.5/utils/create-cluster> cat foo.lua
redis.call('hset', 'simple', '1', '2');
redis.call('publish', 'my:{simple}', '12345');
i subscribe on three node, each node got one message as expected.
1) "message"
2) "my:{simple}"
3) "12345"
am i missing anything @mrniko
Comment From: mrniko
I tried but failed to reproduce this issue with three-node cluster.
Did you add slave per master? try three masters cluster with one slave per master.
Comment From: patpatbear
I tried but failed to reproduce this issue with three-node cluster.
I mean 3-master, 6-node, each master with an replica (created by create-cluster.sh shipped with redis)
Comment From: mrniko
subscribed on master?
Comment From: patpatbear
yes, subscribe on master