Recall & Review
beginner
What does the
UNSUBSCRIBE command do in Redis?It stops the client from receiving messages from the specified channels or all channels if none are specified.
Click to reveal answer
beginner
If a client is subscribed to multiple channels, what happens when it sends
UNSUBSCRIBE without any channel names?The client unsubscribes from all channels it is currently subscribed to.
Click to reveal answer
intermediate
What message does Redis send back to the client after an
UNSUBSCRIBE command?Redis sends a message showing the channel unsubscribed from and the number of channels the client is still subscribed to.
Click to reveal answer
intermediate
Can a client unsubscribe from channels it is not subscribed to using
UNSUBSCRIBE?No, Redis ignores unsubscribe requests for channels the client is not subscribed to and does not send an error.
Click to reveal answer
beginner
What happens if a client unsubscribes from all channels and has no subscriptions left?
The client stops receiving any published messages until it subscribes again.
Click to reveal answer
What does the Redis
UNSUBSCRIBE command do?✗ Incorrect
UNSUBSCRIBE stops the client from receiving messages from the specified channels.
If you call
UNSUBSCRIBE with no arguments, what happens?✗ Incorrect
Calling UNSUBSCRIBE without arguments unsubscribes the client from all channels.
What does Redis send back after an
UNSUBSCRIBE command?✗ Incorrect
Redis replies with the channel unsubscribed from and how many subscriptions remain.
Can you unsubscribe from a channel you are not subscribed to?
✗ Incorrect
Redis ignores unsubscribe requests for channels the client is not subscribed to without error.
What happens after a client unsubscribes from all channels?
✗ Incorrect
After unsubscribing from all channels, the client stops receiving published messages.
Explain how the
UNSUBSCRIBE command works in Redis Pub/Sub.Think about what happens when you want to stop listening to messages.
You got /4 concepts.
Describe the client state after unsubscribing from all channels in Redis.
Consider what it means to stop listening completely.
You got /3 concepts.