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

Redis Punsubscribe Command

Redis Punsubscribe Command

Redis Publish/Subscribe

The Redis Punsubscribe command is used to unsubscribe from all channels matching the given patterns.

Syntax

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



redis 127.0.0.1:6379> PUNSUBSCRIBE [pattern [pattern ...]]

Available Version

= 2.0.0

Return Value

This command behaves differently across different clients.

Example



redis 127.0.0.1:6379> PUNSUBSCRIBE mychannel 

1) "punsubscribe"

2) "a"

3) (integer) 1

Redis Publish/Subscribe