The message (any type, use RAW type for communication with
non-R subscribers.
Value
Each subscribed channel corresponds to three list elements, the header
'subscribe' followed by the channel name and a count indicating the total
number of subscriptions.
Details
(From the Redis.io documentation):
redisSubscribe, redisUnsubscribe and redisPublish
implement the Publish/Subscribe messaging paradigm where (citing Wikipedia)
senders (publishers) are not programmed to send their messages to specific
receivers (subscribers). Rather, published messages are characterized into
channels, without knowledge of what (if any) subscribers there may be.
Subscribers express interest in one or more channels, and only receive messages
that are of interest, without knowledge of what (if any) publishers there are.
Use the Redis function redisUnsubscribe to unsubscribe from one or
more channels. Service incoming messanges on the channels with either
redisGetResponse or redisMonitorChannels.
Use of any other Redis after redisSubscribe prior to calling
redisUnsubscribe will result in an error.