Redis Pub/Sub: SUBSCRIBE
SUBSCRIBE channel [channel ...]
Redis SUBSCRIBE command is used to subscribe the client to the specified channels.
Syntax:
SUBSCRIBE channel [channel ...]
Available since
2.0.0.
Return Value
Array reply.
Return Value Type
Array
Example: Redis SUBSCRIBE
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"
Previous:
PUNSUBSCRIBE
Next:
UNSUBSCRIBE
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework