Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Redis Pubsub Command

Redis Pubsub Command

Redis Publish/Subscribe

The Redis Pubsub command is used to inspect the state of the subscription and publication system; it consists of several subcommands in different formats.

Syntax

The basic syntax of the redis Pubsub command is as follows:



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

Available Version

= 2.8.0

Return Value

A list of active channels.

Example



redis 127.0.0.1:6379> PUBSUB CHANNELS

(empty list or set)

Redis Publish/Subscribe