class Redis

def xgroup(subcommand, key, group, id_or_consumer = nil, mkstream: false)

Returns:
  • (Integer) - effected count if subcommand is `destroy` or `delconsumer`
  • (String) - `OK` if subcommand is `create` or `setid`

Parameters:
  • mkstream (Boolean) -- whether to create an empty stream automatically or not
  • id_or_consumer (String) --
  • group (String) -- the consumer group name
  • key (String) -- the stream key
  • subcommand (String) -- `create` `setid` `destroy` `delconsumer`

Other tags:
    Example: With `delconsumer` subcommand -
    Example: With `destroy` subcommand -
    Example: With `setid` subcommand -
    Example: With `create` subcommand -
def xgroup(subcommand, key, group, id_or_consumer = nil, mkstream: false)
  args = [:xgroup, subcommand, key, group, id_or_consumer, (mkstream ? 'MKSTREAM' : nil)].compact
  synchronize { |client| client.call(args) }
end