Latest web development tutorials

Redis Punsubscribe command

Redis publish and subscribe

Redis Punsubscribe command is used to unsubscribe from all channels of a given pattern.

grammar

redis Punsubscribe basic command syntax is as follows:

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

Available versions

> = 2.0.0

return value

This command has different manifestations in different clients.

Examples

redis 127.0.0.1:6379> PUNSUBSCRIBE mychannel 
1) "punsubscribe"
2) "a"
3) (integer) 1

Redis publish and subscribe