Programmer Reference : Redis : EsRedisStreamCommands
EsRedisStreamCommands
Description
Provides an API for the Redis Stream commands. A Redis stream is a data structure that acts like an append-only log but also implements several operations to overcome some of the limits of a typical append-only log.
This command group is accessed via EsRedisClient>>streams.
Class Methods
None
Instance Methods
xack:group:ids:
  Acknowledges the processing of one or more messages.
    
     Arguments:
        aKey - <String> The key of the stream.
        aGroup - <String> The name of the consumer group.
        aCollectionOfIds - <Collection> A collection of message IDs to acknowledge.
     Answers:
        <Integer> The number of messages acknowledged.
        <EsFuture> In async mode, a future that completes with the result.
xadd:id:fields:
  Appends a new entry to a stream.
    
     Arguments:
        aKey - <String> The key of the stream.
        anId - <String> The message ID. Use '*' to auto-generate.
        aDictionary - <Dictionary> A dictionary of field-value pairs.
     Answers:
        <String> The ID of the added entry.
        <EsFuture> In async mode, a future that completes with the result.
xautoclaim:group:consumer:minIdleTime:start:
  Changes the ownership of pending messages.
    
     Arguments:
        aKey - <String> The key of the stream.
        aGroup - <String> The consumer group name.
        aConsumer - <String> The consumer name.
        anInteger - <Integer> The minimum idle time in milliseconds.
        aStartId - <String> The starting message ID.
     Answers:
        <Array> An array containing the next start ID and an array of claimed messages.
        <EsFuture> In async mode, a future that completes with the result.
xclaim:group:consumer:minIdleTime:ids:
  Changes the ownership of a pending message.
    
     Arguments:
        aKey - <String> The key of the stream.
        aGroup - <String> The consumer group name.
        aConsumer - <String> The consumer name.
        anInteger - <Integer> The minimum idle time in milliseconds.
        aCollectionOfIds - <Collection> The message IDs to claim.
     Answers:
        <Array> An array of claimed messages.
        <EsFuture> In async mode, a future that completes with the result.
xdel:ids:
  Removes the specified entries from a stream.
    
     Arguments:
        aKey - <String> The key of the stream.
        aCollectionOfIds - <Collection> The message IDs to delete.
     Answers:
        <Integer> The number of entries deleted.
        <EsFuture> In async mode, a future that completes with the result.
xgroupCreate:group:id:
  Create a new consumer group associated with a stream.
    
     Arguments:
        aKey - <String> The key of the stream.
        aGroup - <String> The name of the consumer group.
        anId - <String> The ID to start consuming from ('$' for new messages).
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
xgroupCreate:group:id:options:
  Create a new consumer group associated with a stream, with options.
    
    Arguments:
        aKey - <String> The key of the stream.
        aGroup - <String> The name of the consumer group.
        anId - <String> The ID to start consuming from ('$' for new messages).
        aCollectionOfOptions - <Collection> Optional arguments like MKSTREAM.
    Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
xgroupCreateconsumer:group:consumer:
  Create a new consumer in a consumer group.
    
     Arguments:
        aKey - <String> The key of the stream.
        aGroup - <String> The name of the consumer group.
        aConsumer - <String> The name of the consumer to create.
     Answers:
        <Integer> 1 if the consumer was created, 0 if it already exists.
        <EsFuture> In async mode, a future that completes with the result.
xgroupDelconsumer:group:consumer:
  Delete a consumer from a consumer group.
    
     Arguments:
        aKey - <String> The key of the stream.
        aGroup - <String> The name of the consumer group.
        aConsumer - <String> The name of the consumer to delete.
     Answers:
        <Integer> The number of pending messages the consumer had before it was deleted.
        <EsFuture> In async mode, a future that completes with the result.
xgroupDestroy:group:
  Destroy a consumer group.
    
     Arguments:
        aKey - <String> The key of the stream.
        aGroup - <String> The name of the consumer group.
     Answers:
        <Integer> 1 if the group was destroyed, 0 otherwise.
        <EsFuture> In async mode, a future that completes with the result.
xgroupSetid:group:id:
  Set the last delivered ID for a consumer group.
    
     Arguments:
        aKey - <String> The key of the stream.
        aGroup - <String> The name of the consumer group.
        anId - <String> The new last delivered ID.
     Answers:
        <String> 'OK'.
        <EsFuture> In async mode, a future that completes with the result.
xinfoStream:
  Get information about a stream.
    
     Arguments:
        aKey - <String> The key of the stream.
     Answers:
        <Dictionary> A dictionary containing stream information.
        <EsFuture> In async mode, a future that completes with the result.
xlen:
  Get the number of entries in a stream.
    
     Arguments:
        aKey - <String> The key of the stream.
     Answers:
        <Integer> The number of entries in the stream.
        <EsFuture> In async mode, a future that completes with the result.
xpending:group:
  Get a summary of pending messages for a consumer group.
    
     Arguments:
        aKey - <String> The key of the stream.
        aGroup - <String> The consumer group name.
     Answers:
        <Dictionary> A dictionary summarizing pending messages with keys: 'pending', 'min', 'max', 'consumers'.
        <EsFuture> In async mode, a future that completes with the result.
xrange:start:end:
  Return a range of entries from a stream.
    
     Arguments:
        aKey - <String> The key of the stream.
        aStartId - <String> The starting message ID ('-' for the first).
        anEndId - <String> The ending message ID ('+' for the last).
     Answers:
        <Array> An array of messages.
        <EsFuture> In async mode, a future that completes with the result.
xread:
  Read data from one or more streams.
    
     Arguments:
        aCollectionOfArgs - <Collection> Arguments like COUNT, BLOCK, STREAMS.
     Answers:
        <Dictionary> A dictionary where keys are stream names and values are
            arrays of messages. The reply is normalized to a Dictionary
            for protocol consistency.
        <EsFuture> In async mode, a future that completes with the result.
xreadgroup:consumer:streams:
  Read from a stream via a consumer group.
    
     Arguments:
        aGroup - <String> The consumer group name.
        aConsumer - <String> The consumer name.
        aStreamDictionary - <Dictionary> Keys are stream keys, values are message IDs to start from.
     Answers:
        <Array> An array of stream data.
        <EsFuture> In async mode, a future that completes with the result.
xreadgroup:consumer:streams:options:
  Read from a stream via a consumer group, with options.
    
    Arguments:
        aGroup - <String> The consumer group name.
        aConsumer - <String> The consumer name.
        aStreamDictionary - <Dictionary> Keys are stream keys, values are message IDs to start from.
        aCollectionOfOptions - <Collection> Optional arguments like NOACK.
    Answers:
        <Array> An array of stream data.
        <EsFuture> In async mode, a future that completes with the result.
xrevrange:start:end:
  Return a range of entries from a stream in reverse order.
    
     Arguments:
        aKey - <String> The key of the stream.
        anEndId - <String> The ending message ID ('+' for the last).
        aStartId - <String> The starting message ID ('-' for the first).
     Answers:
        <Array> An array of messages.
        <EsFuture> In async mode, a future that completes with the result.
xtrim:strategy:threshold:
  Trims the stream to a given number of items.
    
     Arguments:
        aKey - <String> The key of the stream.
        aStrategy - <String> 'MAXLEN' or 'MINID'.
        aThreshold - <Object> The threshold for the strategy.
     Answers:
        <Integer> The number of entries deleted from the stream.
        <EsFuture> In async mode, a future that completes with the result.
Last modified date: 01/22/2026