Redis Subscribe Command
The Redis Subscribe command is used to subscribe to messages from one or more given channels.
Syntax
The basic syntax of the redis Subscribe command is as follows:
redis 127.0.0.1:6379> SUBSCRIBE channel [channel ...]
Available Version
= 2.0.0
Return Value
The received message
Example
redis 127.0.0.1:6379> SUBSCRIBE mychannel
Reading messages... (press Ctrl-C to quit)
1) "subscribe"
2) "mychannel"
3) (integer) 1
1) "message"
2) "mychannel"
3) "a"