PUB / SUB test failing?

21 बार देखा गया
नहीं पढ़े गए पहले मैसेज पर जाएं

JL

नहीं पढ़ी गई,
5 अक्तू॰ 2016, 5:08:13 pm5/10/16
ईमेल पाने वाला Redis DB
hi there. 

I'm trying to follow the suggestion for testing / learning about redis' pub/sub model here:  http://redis.io/topics/notifications

This is what I've done in my first terminal window: 


redis
-db-1:~# redis-cli config set notify-keyspace-events KEA
OK
redis
-db-1:~# redis-cli --csv psubscribe '_key*_:*'
Reading messages... (press Ctrl-C to quit)
"psubscribe","_key*_:*",1


And then, in a second terminal screen, I've tried this: 

127.0.0.1:6379> HMSET widget:123 uri 1234@test.net
OK
127.0.0.1:6379> HMSET widget:223 uri 1234@test.net
OK
127.0.0.1:6379> HGET  widget:223 uri
"12...@test.net"
127.0.0.1:6379> SET killme abc@test.com

OK

But none of these commands in terminal 2 are triggering things in terminal 1.  Should I be expecting to see things in terminal 1?  I would have thought so.  But maybe I've misunderstood something or skipped a step? 
Any help would be appreciated.




JL

नहीं पढ़ी गई,
6 अक्तू॰ 2016, 8:29:23 am6/10/16
ईमेल पाने वाला Redis DB
Hi y'all.  
Figured it out.  It's actually a double underscore that's needed on either side of the word "key".
So I changed this: 
'_key*_:*'

to 

'__key*__:*'


सभी प्रषकों को उत्तर दें
लेखक को उत्तर दें
आगे भेजें
0 नया मैसेज