You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to write a program that subscribes to a keyspace change pattern. If it detects that a key has changed, I'd like to know which specific key it was. I began with redisclient-0.6.1/examples/async_pubsub2.cpp then simplified it to
which subscribes to changes to any key beginning with x. It half-works: when I change the value of key xy (manually, using redis-cli from another terminal), the onMessage() method in the program above is called, but msg just contains "set". But which key was set--xy or xz or .... ?
How should the code be changed so that it also captures the name(s) of the changed key(s)?
The text was updated successfully, but these errors were encountered:
I'm trying to write a program that subscribes to a keyspace change pattern. If it detects that a key has changed, I'd like to know which specific key it was. I began with
redisclient-0.6.1/examples/async_pubsub2.cpp
then simplified it towhich subscribes to changes to any key beginning with
x
. It half-works: when I change the value of keyxy
(manually, usingredis-cli
from another terminal), theonMessage()
method in the program above is called, butmsg
just contains "set
". But which key was set--xy
orxz
or .... ?How should the code be changed so that it also captures the name(s) of the changed key(s)?
The text was updated successfully, but these errors were encountered: