content/commands/subscribe.md
Subscribes the client to the specified channels.
Once the client enters the subscribed state it is not supposed to issue any
other commands, except for additional SUBSCRIBE, [SSUBSCRIBE]({{< relref "/commands/ssubscribe" >}}), [PSUBSCRIBE]({{< relref "/commands/psubscribe" >}}), [UNSUBSCRIBE]({{< relref "/commands/unsubscribe" >}}), [SUNSUBSCRIBE]({{< relref "/commands/sunsubscribe" >}}),
[PUNSUBSCRIBE]({{< relref "/commands/punsubscribe" >}}), [PING]({{< relref "/commands/ping" >}}), [RESET]({{< relref "/commands/reset" >}}) and [QUIT]({{< relref "/commands/quit" >}}) commands.
However, if RESP3 is used (see [HELLO]({{< relref "/commands/hello" >}})) it is possible for a client to issue any commands while in subscribed state.
For more information, see [Pub/sub]({{< relref "/develop/pubsub" >}}).
>= 6.2.0: [RESET]({{< relref "/commands/reset" >}}) can be called to exit subscribed state.| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | |
{{< multitabs id="subscribe-return-info" tab1="RESP2" tab2="RESP3" >}}
When successful, this command doesn't return anything. Instead, for each channel, one message with the first element being the string subscribe is pushed as a confirmation that the command succeeded.
-tab-sep-
When successful, this command doesn't return anything. Instead, for each channel, one message with the first element being the string subscribe is pushed as a confirmation that the command succeeded.
{{< /multitabs >}}