Can I set up Redis to publish to a pub/sub channel when a key-value is changed?
Is there anyway to monitor these changes automatically or do I just need to build it in a part of the set to broadcast the new value?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That sort of thing is too complex/not generic enough to be built in to redis, but it is easier to do as part of your client anyway – just send a PUBLISH command after the SET.
Note that unlike SUBSCRIBE, PUBLISH does not require a dedicated connection so is easily integrated with other commands.