0
0
Redisquery~10 mins

PUBLISH to channels in Redis - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to publish the message 'Hello' to the channel 'news'.

Redis
PUBLISH [1] Hello
Drag options to blanks, or click blank then click option'
Achannel
Bmessage
Cnews
Dhello
Attempts:
3 left
💡 Hint
Common Mistakes
Using the message text as the channel name.
Confusing the channel name with the command.
2fill in blank
medium

Complete the code to publish the message 'Update' to the channel named 'alerts'.

Redis
PUBLISH [1] Update
Drag options to blanks, or click blank then click option'
Aupdates
Bnews
Cmessages
Dalerts
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong channel name like 'news' or 'updates'.
Mixing up the message and channel parameters.
3fill in blank
hard

Fix the error in the code to correctly publish 'Alert!' to the 'system' channel.

Redis
PUBLISH system [1]
Drag options to blanks, or click blank then click option'
A'Alert!'
BAlert
CAlert!
D"Alert!"
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the message causing syntax errors.
Using double quotes which may not be accepted in some shells.
4fill in blank
hard

Fill both blanks to publish the message 'Server down' to the 'status' channel.

Redis
PUBLISH [1] [2]
Drag options to blanks, or click blank then click option'
Astatus
B'Server down'
CServer down
Dserver
Attempts:
3 left
💡 Hint
Common Mistakes
Using unquoted message text with spaces.
Using wrong channel names.
5fill in blank
hard

Fill both blanks to publish the message 'Error 404' to the 'logs' channel using the Redis CLI.

Redis
PUBLISH [1] [2]
Drag options to blanks, or click blank then click option'
Alogs
B'Error 404'
CError 404
Derrors
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the message with spaces.
Using incorrect channel names.