class Redis

def xinfo(subcommand, key, group = nil)

Returns:
  • (Array) - information of the consumers if subcommand is `consumers`
  • (Array) - information of the consumer groups if subcommand is `groups`
  • (Hash) - information of the stream if subcommand is `stream`

Parameters:
  • group (String) -- the consumer group name, required if subcommand is `consumers`
  • key (String) -- the stream key
  • subcommand (String) -- e.g. `stream` `groups` `consumers`

Other tags:
    Example: consumers -
    Example: groups -
    Example: stream -
def xinfo(subcommand, key, group = nil)
  args = [:xinfo, subcommand, key, group].compact
  synchronize do |client|
    client.call(args) do |reply|
      case subcommand.to_s.downcase
      when 'stream'              then Hashify.call(reply)
      when 'groups', 'consumers' then reply.map { |arr| Hashify.call(arr) }
      else reply
      end
    end
  end
end