Skip to content

Conversation

@viktoriya-kutsarova
Copy link
Contributor

@viktoriya-kutsarova viktoriya-kutsarova commented Oct 24, 2025

This change introduces the Support XDELEX, XACKEX and extend XADD and XTRIM options feature as part of the features provided by the spring-data-redis project. Closes #3232.

As part of the change the following commands would be made available:

  • XDELEX - deletes one or multiple entries from the stream at the specified key. XDELEX is an extension of the Redis Streams XDEL command that provides more control over how message entries are deleted concerning consumer groups.
  • XACKDEL - acknowledges and conditionally deletes one or multiple entries (messages) for a stream consumer group at the specified key. XACKDEL combines the functionality of XACK and XDEL in Redis Streams. It acknowledges the specified entry IDs in the given consumer group and simultaneously attempts to delete the corresponding entries from the stream.

As part of the change the following command options would be made available for XADD and XTRIM:

  • KEEPREF | DELREF | ACKED - Specifies how to handle consumer group references when trimming. Available since Redis 8.2. If no option is specified, KEEPREF is used by default. Unlike the XDELEX and XACKDEL commands where one of these options is required, here they are optional to maintain backward compatibility:
  • =: Exact trimming (default) - trims to the exact threshold
  • LIMIT count - Limits the number of entries to examine during trimming. Available since Redis 6.2.0. When not specified, Redis uses a default value of 100 * the number of entries in a macro node. Specifying 0 disables the limiting mechanism entirely.

The new commands are available as part of the following interfaces:

  • RedisStreamCommands / ReactiveStreamCommands
  • StreamOperations / ReactiveStreamOperations / BoundStreamOperations
  • StringRedisConnection
  • New enum StreamDeletionPolicy and StreamEntryDeletionResult inside RedisStreamCommands

This feature is available starting from Redis OSS version 8.2.x and later


  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 24, 2025
Closes spring-projects#3232

Signed-off-by: viktoriya.kutsarova <[email protected]>

# Conflicts:
#	src/main/java/org/springframework/data/redis/connection/ReactiveStreamCommands.java
#	src/main/java/org/springframework/data/redis/connection/jedis/JedisClusterStreamCommands.java
#	src/main/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveStreamCommands.java
#	src/main/java/org/springframework/data/redis/core/ReactiveStreamOperations.java
#	src/test/java/org/springframework/data/redis/connection/jedis/StreamConvertersUnitTest.java

# Conflicts:
#	Makefile
@viktoriya-kutsarova viktoriya-kutsarova force-pushed the topic/introduce-xdelex-xackdel-and-expand-xadd-xtrim branch from e9402e4 to b604a71 Compare October 27, 2025 10:36
@viktoriya-kutsarova viktoriya-kutsarova force-pushed the topic/introduce-xdelex-xackdel-and-expand-xadd-xtrim branch from b604a71 to e108b24 Compare October 27, 2025 12:24
@mp911de mp911de added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Support XDELEX, XACKEX and extend XADD and XTRIM options from Redis 8.2

4 participants