PUNSUBSCRIBE

Removes a pattern subscription from the connection.

Pub/Sub · Example verified

Syntax covered here

PUNSUBSCRIBE pattern

Removing the sole tested pattern left the connection with no subscriptions.

Tested example & replies

Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.

# connection: subscriber
> PSUBSCRIBE news.*
["psubscribe","news.*",1]
# connection: default
> PUBLISH news.one hello
1
# connection: subscriber
# receive pushed message
["pmessage","news.*","news.one","hello"]
# connection: subscriber
> PUNSUBSCRIBE news.*
["punsubscribe","news.*",0]