module Redis::Commands::Streams
def xreadgroup(group, consumer, keys, ids, count: nil, block: nil, noack: nil)
-
(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, count: nil, block: nil, noack: nil) args = [:xreadgroup, 'GROUP', group, consumer] args << 'COUNT' << count if count args << 'BLOCK' << block.to_i if block args << 'NOACK' if noack _xread(args, keys, ids, block) end