module Redis::Commands::Streams

def xautoclaim(key, group, consumer, min_idle_time, start, count: nil, justid: false)

Returns:
  • (Array) - the entry ids successfully claimed if justid option is `true`
  • (Hash{String => Hash}) - the entries successfully claimed

Parameters:
  • justid (Boolean) -- whether to fetch just an array of entry ids or not.
  • count (Integer) -- number of messages to claim (default 1)
  • start (String) -- entry id to start scanning from or 0-0 for everything
  • min_idle_time (Integer) -- the number of milliseconds
  • consumer (String) -- the consumer name
  • group (String) -- the consumer group name
  • key (String) -- the stream key

Other tags:
    Example: Claim next pending message after this id stuck > 5 minutes and mark as retry -
    Example: Claim next pending message stuck > 5 minutes and don't mark as retry -
    Example: Claim 50 next pending messages stuck > 5 minutes and mark as retry -
    Example: Claim next pending message stuck > 5 minutes and mark as retry -
def xautoclaim(key, group, consumer, min_idle_time, start, count: nil, justid: false)
  args = [:xautoclaim, key, group, consumer, min_idle_time, start]
  if count
    args << 'COUNT' << count.to_s
  end
  args << 'JUSTID' if justid
  blk = justid ? HashifyStreamAutoclaimJustId : HashifyStreamAutoclaim
  send_command(args, &blk)
end