Latest web development tutorials

Redis Pubsub command

Redis publish and subscribe

Redis Pubsub command is used to view subscription status and distribution system, which consists of a number of different formats of sub commands.

grammar

redis Pubsub basic command syntax is as follows:

redis 127.0.0.1:6379> PUBSUB <subcommand> [argument [argument ...]]

Available versions

> = 2.8.0

return value

A list of the active channels thereof.

Examples

redis 127.0.0.1:6379> PUBSUB CHANNELS
(empty list or set)

Redis publish and subscribe