English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Redis Psubscribe command subscribes to one or more channels that match the given pattern.
Each pattern is separated by * As a match pattern, for example, it* Match all channels that start with it (it.news, it.blog, it.tweets, etc.). news.* Match all channels that start with news. (news.it, news.global.today, etc.), and so on.
The basic syntax of the redis Psubscribe command is as follows:
redis 127.0.0.1:6379> PSUBSCRIBE pattern [pattern ...]
>= 2.0.0
Received information.
redis 127.0.0.1:6379> PSUBSCRIBE mychannel Reading messages... (press Ctrl-C to quit) 1) "psubscribe" 2) "mychannel" 3) (integer) 1