Created
October 21, 2012 19:00
-
-
Save mrkvm/3928096 to your computer and use it in GitHub Desktop.
A very, very simple Redis PUB/SUB example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Redis PUB/SUB example: | |
# client 1: | |
redis 127.0.0.1:6379> subscribe beartalk | |
Reading messages... (press Ctrl-C to quit) | |
1) "subscribe" | |
2) "beartalk" | |
3) (integer) 1 | |
# ...wait around for message... | |
1) "message" | |
2) "beartalk" | |
3) "we're having a good time" | |
# client 2: | |
redis 127.0.0.1:6379> publish beartalk "we're having a good time" | |
(integer) 1 | |
Important notes: | |
- No guaranteed delivery. Make your own guarantees. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment