0
0
Redisquery~20 mins

XACK for acknowledging messages in Redis - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Redis XACK Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
query_result
intermediate
2:00remaining
What does the XACK command return after acknowledging a message?
Given a Redis stream consumer group, when you run XACK to acknowledge a message ID, what is the output of the command?
Redis
XACK mystream mygroup 1526985058136-0
A1
B0
CAn error message
DThe acknowledged message ID
Attempts:
2 left
💡 Hint
Think about what XACK returns when it successfully acknowledges a message.
🧠 Conceptual
intermediate
2:00remaining
Why is acknowledging messages with XACK important in Redis streams?
In Redis streams, what is the main purpose of using the XACK command after processing a message?
ATo remove the message from the stream permanently
BTo reset the stream to the beginning
CTo delete the consumer group
DTo mark the message as processed so it won't be delivered again to the same consumer group
Attempts:
2 left
💡 Hint
Think about how Redis tracks which messages are pending for a consumer group.
📝 Syntax
advanced
2:00remaining
Which XACK command syntax is correct to acknowledge multiple messages?
You want to acknowledge two messages with IDs 1609459200000-0 and 1609459200001-0 in the consumer group group1 on stream mystream. Which command is syntactically correct?
AXACK mystream group1 '1609459200000-0 1609459200001-0'
BXACK mystream group1 1609459200000-0 1609459200001-0
CXACK mystream group1 (1609459200000-0, 1609459200001-0)
DXACK mystream group1 [1609459200000-0, 1609459200001-0]
Attempts:
2 left
💡 Hint
XACK accepts multiple message IDs separated by spaces without brackets or quotes.
🔧 Debug
advanced
2:00remaining
Why does this XACK command return 0 instead of 1?
You run the command XACK mystream mygroup 1609459200000-0 but it returns 0. What is the most likely reason?
AThe consumer group does not exist
BThe stream is empty
CThe message ID is not pending in the consumer group's pending entries list
DThe message ID does not exist in the stream
Attempts:
2 left
💡 Hint
XACK only acknowledges messages that are pending for the group.
optimization
expert
2:00remaining
How to efficiently acknowledge a large batch of messages in Redis streams?
You have processed 10,000 messages from a Redis stream consumer group and want to acknowledge them all efficiently. Which approach is best?
AUse XACK with a Lua script to batch acknowledge messages in chunks
BRun 10,000 separate XACK commands, one per message ID
CRun a single XACK command listing all 10,000 message IDs separated by spaces
DDelete the stream to remove all messages at once
Attempts:
2 left
💡 Hint
Consider Redis command length limits and network overhead.