Can keyspace-events message publish to slave redis?

376 views
Skip to first unread message

Flily Hsu

unread,
Jan 5, 2014, 9:54:37 PM1/5/14
to redi...@googlegroups.com
I set up a new version of master redis in current 2.8.3, and set notify-keyspace-events EA. I use PSUBSCRIBE * command db and change a value of key, messages can be received on master db, but it doesn't work on slave db, for both slave redis version 2.8.3 and 2.6.16.

Can I receive keyspace-events message on slave db?

Josiah Carlson

unread,
Jan 7, 2014, 4:46:25 PM1/7/14
to redi...@googlegroups.com
As far as I can tell, keyspace notifications are not sent to the slave, because the data manipulations themselves are sent to the slave, which can have its own keyspace notifications set.

To get keyspace notifications on the slave, you need to be running 2.8+ on the slave, and you need to set the keyspace notification configuration to what you need, then subscribe to those notifications on the slave.

If you are still having difficulties after you have properly set your configuration on the master and slave, please report what you are seeing from INFO on both the master and slave, as well as the output of "redis-cli config get notify-keyspace-events" for both the master and slave.

 - Josiah


On Sun, Jan 5, 2014 at 6:54 PM, Flily Hsu <klose...@gmail.com> wrote:
I set up a new version of master redis in current 2.8.3, and set notify-keyspace-events EA. I use PSUBSCRIBE * command db and change a value of key, messages can be received on master db, but it doesn't work on slave db, for both slave redis version 2.8.3 and 2.6.16.

Can I receive keyspace-events message on slave db?

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at http://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages