class Redis

def xreadgroup(group, consumer, keys, ids, opts = {})

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

Options Hash: (**opts)
  • :noack (Boolean) -- whether message loss is acceptable or not
  • :block (Integer) -- the number of milliseconds as blocking timeout
  • :count (Integer) -- the number of entries as limit

Parameters:
  • opts (Hash) -- several options for `XREADGROUP` command
  • ids (Array) -- one or multiple entry ids
  • keys (Array) -- one or multiple stream keys
  • consumer (String) -- the consumer name
  • group (String) -- the consumer group name

Other tags:
    Example: With noack option -
    Example: With block option -
    Example: With count option -
    Example: With multiple keys -
    Example: With a key -
def xreadgroup(group, consumer, keys, ids, opts = {})
  args = [:xreadgroup, 'GROUP', group, consumer]
  args << 'COUNT' << opts[:count] if opts[:count]
  args << 'BLOCK' << opts[:block].to_i if opts[:block]
  args << 'NOACK' if opts[:noack]
  _xread(args, keys, ids, opts[:block])
end