While a connection has active subscriptions, use a separate connection for regular data commands including
PUBLISH. Call UNSUBSCRIBE / PUNSUBSCRIBE (or RESET) to release all subscriptions and return the connection to normal command mode.SUBSCRIBE
Subscribes to one or more channels. After this command your connection enters subscriber mode. For each channel you subscribe to, Cache-Pot sends a confirmation reply:["subscribe", channel, subscription_count].
Syntax: SUBSCRIBE channel [channel ...]
["subscribe", channel_name, total_subscription_count].
UNSUBSCRIBE
Unsubscribes from one or more channels. Omit channel names to unsubscribe from all channels at once. Cache-Pot sends a confirmation reply for each channel unsubscribed. When your total subscription count (channels + patterns) drops to zero, the connection leaves subscriber mode. Syntax:UNSUBSCRIBE [channel ...]
["unsubscribe", channel_name, total_subscription_count].
PSUBSCRIBE
Subscribes to one or more glob patterns. You will receive messages from any channel whose name matches a subscribed pattern. Patterns use the same syntax asKEYS: * matches any sequence, ? matches any single character, [...] matches a character class.
Messages delivered through a pattern subscription arrive as 4-element pmessage replies: ["pmessage", pattern, channel, message].
Syntax: PSUBSCRIBE pattern [pattern ...]
["psubscribe", pattern, total_subscription_count].
PUNSUBSCRIBE
Unsubscribes from one or more patterns. Omit patterns to unsubscribe from all active pattern subscriptions at once. Syntax:PUNSUBSCRIBE [pattern ...]
["punsubscribe", pattern, total_subscription_count].
PUBLISH
Publishesmessage to channel. All clients currently subscribed to that channel (via SUBSCRIBE) or to a matching pattern (via PSUBSCRIBE) receive the message immediately.
Syntax: PUBLISH channel message