Complete the code to read entries from a Redis stream named 'mystream' starting from the beginning.
XREAD COUNT 10 STREAMS mystream [1]
The '0' means reading from the start of the stream, so XREAD returns all entries from the beginning.
Complete the code to read entries from multiple streams 'stream1' and 'stream2' starting from their last IDs.
XREAD STREAMS stream1 stream2 [1] [1]
The '>' ID means reading only new entries added after the command runs for each stream.
Fix the error in the code to read 5 entries from 'mystream' starting after ID '1609459200000-0'.
XREAD COUNT 5 STREAMS mystream [1]
The ID '1609459200000-1' reads entries after '1609459200000-0'. Using the same ID would return that entry again.
Fill both blanks to read entries from 'streamA' and 'streamB' starting from the beginning and the last entry respectively.
XREAD STREAMS streamA streamB [1] [2]
Use '0' to read all entries from 'streamA' from the start, and '>' to read only new entries from 'streamB'.
Fill all three blanks to read 3 entries from 's1' and 's2' starting from '0-0' and from the latest entry respectively.
XREAD COUNT [1] STREAMS s1 s2 [2] [3]
Read 3 entries (COUNT 3), from 's1' starting from '0-0' (which means from the beginning), and from 's2' starting at the latest entry ('>')