extends RExpirableRx {
/**
* Creates consumer group by name.
*
* @param groupName - name of group
* @return void
*/
Completable createGroup(String groupName);
/**
* Creates consumer group by name and stream id.
* Only new messages after defined stream id
will be available for consumers of this group.
*
* {@link StreamMessageId#NEWEST} is used for messages arrived since the moment of group creating
*
* @param groupName - name of group
* @param id - stream id
* @return void
*/
Completable createGroup(String groupName, StreamMessageId id);
/**
* Removes group by name.
*
* @param groupName - name of group
* @return void
*/
Completable removeGroup(String groupName);
/**
* Creates consumer of the group by name.
*
* Requires Redis 6.2.0 and higher.
*
* @param groupName - name of group
* @param consumerName - name of consumer
*/
Completable createConsumer(String groupName, String consumerName);
/**
* Removes consumer of the group by name.
*
* @param groupName - name of group
* @param consumerName - name of consumer
* @return number of pending messages owned by consumer
*/
Single removeConsumer(String groupName, String consumerName);
/**
* Updates next message id delivered to consumers.
*
* @param groupName - name of group
* @param id - Stream Message ID
* @return void
*/
Completable updateGroupMessageId(String groupName, StreamMessageId id);
/**
* Marks pending messages by group name and stream ids
as correctly processed.
*
* @param groupName - name of group
* @param ids - stream ids
* @return marked messages amount
*/
Single ack(String groupName, StreamMessageId... ids);
/**
* Returns common info about pending messages by group name.
*
* @param groupName - name of group
* @return result object
*/
Single getPendingInfo(String groupName);
/*
* Use #getPendingInfo method
*/
@Deprecated
Single listPending(String groupName);
/**
* Returns list of pending messages by group name.
* Limited by start stream id and end stream id and count.
*
* {@link StreamMessageId#MAX} is used as max stream id
* {@link StreamMessageId#MIN} is used as min stream id
*
* @param groupName - name of group
* @param startId - start stream id
* @param endId - end stream id
* @param count - amount of messages
* @return list
*/
Single> listPending(String groupName, StreamMessageId startId, StreamMessageId endId, int count);
/**
* Returns list of pending messages by group name and consumer name.
* Limited by start stream id and end stream id and count.
*
* {@link StreamMessageId#MAX} is used as max stream id
* {@link StreamMessageId#MIN} is used as min stream id
*
* @param consumerName - name of consumer
* @param groupName - name of group
* @param startId - start stream id
* @param endId - end stream id
* @param count - amount of messages
* @return list
*/
Single> listPending(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, int count);
/**
* Returns list of common info about pending messages by group name.
* Limited by minimum idle time, messages count, start and end Stream Message IDs.
*
* {@link StreamMessageId#MAX} is used as max Stream Message ID
* {@link StreamMessageId#MIN} is used as min Stream Message ID
*
* Requires Redis 6.2.0 and higher.
*
* @see #pendingRange
*
* @param groupName - name of group
* @param startId - start Stream Message ID
* @param idleTime - minimum idle time of messages
* @param idleTimeUnit - idle time unit
* @param endId - end Stream Message ID
* @param count - amount of messages
* @return list
*/
Single> listPending(String groupName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count);
/**
* Returns list of common info about pending messages by group and consumer name.
* Limited by minimum idle time, messages count, start and end Stream Message IDs.
*
* {@link StreamMessageId#MAX} is used as max Stream Message ID
* {@link StreamMessageId#MIN} is used as min Stream Message ID
*
* Requires Redis 6.2.0 and higher.
*
* @see #pendingRange
*
* @param consumerName - name of consumer
* @param groupName - name of group
* @param startId - start Stream Message ID
* @param endId - end Stream Message ID
* @param idleTime - minimum idle time of messages
* @param idleTimeUnit - idle time unit
* @param count - amount of messages
* @return list
*/
Single> listPending(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count);
/**
* Returns stream data of pending messages by group name.
* Limited by minimum idle time, messages count, start and end Stream Message IDs.
*
* {@link StreamMessageId#MAX} is used as max Stream Message ID
* {@link StreamMessageId#MIN} is used as min Stream Message ID
*
* Requires Redis 6.2.0 and higher.
*
* @see #listPending
*
* @param groupName - name of group
* @param startId - start Stream Message ID
* @param endId - end Stream Message ID
* @param idleTime - minimum idle time of messages
* @param idleTimeUnit - idle time unit
* @param count - amount of messages
* @return map
*/
Single