ZRANK.WATCH
Syntax
Section titled “Syntax”ZRANK.WATCH key
ZRANK.WATCH creates a query subscription over the ZRANK command. The client invoking the command will receive the output of the ZRANK command (not just the notification) whenever the value against the key is updated.
You can update the key in any other client. The ZRANK.WATCH client will receive the updated value.
Examples
Section titled “Examples”client1:7379> ZADD users 10 alice 20 bob 30 charlieOK 3client1:7379> ZRANK.WATCH users bobentered the watch mode for ZRANK.WATCH users
client2:7379> ZADD users 10 bobOK 0client2:7379> ZADD users 100 aliceOK 0
client1:7379> ...entered the watch mode for ZRANK.WATCH usersOK [fingerprint=3262833422269415227] 2) 10, bobOK [fingerprint=3262833422269415227] 1) 10, bob