YouTip LogoYouTip

Pub Sub Subscribe

# Redis Subscribe Command | Rookie Tutorial # [Rookie Tutorial β€” * (javascript:void(0);) * (javascript:void(0);) * (javascript:void(0);) * (javascript:void(0)) Redis Tutorial (#)(#)(#)(#)(#) ## Redis Commands (#)(#)(#)(#)(#)(#)(#)(#)[Redis Pub/Sub](#)(#)(#)(#)(#)(#)(#) ## Advanced Redis Tutorials (#)(#)(#)(#)(#)(#)(#)(#) [](#)(#) (#)[](#) # Redis Subscribe Command !(#)[Redis Pub/Sub](#) The Redis Subscribe command is used to subscribe to messages from one or more given channels. ### Syntax The basic syntax of the Redis Subscribe command is as follows: redis 127.0.0.1:6379> SUBSCRIBE channel [channel ...] ### Available since >= 2.0.0 ### Return value Received messages ### Example redis 127.0.0.1:6379> SUBSCRIBE mychannel Reading messages... (press Ctrl-C to quit)1) "subscribe"2) "mychannel"3) (integer) 11) "message"2) "mychannel"3) "a" !(#)[Redis Pub/Sub](#)
← Transactions UnwatchTransactions Multi β†’