Redis 5.0、6.2、7.0,及其 ValKey 8.0标准架构与集群架构均支持 xinfo、xadd、xtrim、xdel、xrange、xrevrange、xlen、xread、xgroup、xreadgroup、xack、xclaim、xpending 命令。Redis 2.8版本标准架构、4.0标准架构与集群架构不支持这些命令。仅6.2、7.0版本支持 xautoclaim。
集群架构跨 Slot 场景不支持 xread、xreadgroup 命令。
具体信息,请参见下表。✓ 表示支持,x 表示不支持,- 表示该命令不存在跨 Slot 访问的场景。
命令 | Redis 7.0/ValKey 8.0 标准架构 | Redis 7.0/ValKey 8.0 集群架构 | Redis 6.2标准架构 | Redis 6.2集群架构 | Redis 5.0标准架构 | Redis 5.0集群架构 | Redis 4.0标准架构 | Redis 4.0集群架构 | Redis 2.8标准架构 | 集群架构跨 Slot 支持 |
xinfo | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x | x | x | - |
xadd | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x | x | x | - |
xtrim | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x | x | x | - |
xdel | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x | x | x | - |
xrange | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x | x | x | - |
xrevrange | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x | x | x | - |
xlen | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x | x | x | - |
xread | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x | x | x | x |
xgroup | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x | x | x | - |
xreadgroup | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x | x | x | x |
xack | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x | x | x | - |
xclaim | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x | x | x | - |
xpending | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x | x | x | - |
xautoclaim | ✓ | ✓ | ✓ | ✓ | x | x | x | x | x | - |