module Redis::Commands::Streams

def xread(keys, ids, count: nil, block: nil)

Returns:
  • (Hash{String => Hash{String => Hash}}) - the entries

Parameters:
  • block (Integer) -- the number of milliseconds as blocking timeout
  • count (Integer) -- the number of entries as limit per stream
  • ids (Array) -- one or multiple entry ids
  • keys (Array) -- one or multiple stream keys

Other tags:
    Example: With block option -
    Example: With count option -
    Example: With multiple keys -
    Example: With a key -
def xread(keys, ids, count: nil, block: nil)
  args = [:xread]
  args << 'COUNT' << count if count
  args << 'BLOCK' << block.to_i if block
  _xread(args, keys, ids, block)
end