Advanced Java Redis client for thread-safe sync, async, and reactive usage. Supports Cluster, Sentinel, Pipelining, and codecs.
5.3k
stars
947
forks
source link
Provide a convenience method to support reading of last message from stream #2861
Closed
tishun closed 1 month ago
Feature Request
A new way to read from the last element of the stream was introduced to
XREAD
with https://github.com/redis/redis/issues/7388We might want to add a convenience method to the
XReadArgs.StreamOffset
class.Is your feature request related to a problem? Please describe
The feature could still be used if the
+
sign is used as offset in theXReadArgs.StreamOffset
constructor.Having a dedicated method would make it easier for the consumers of the driver.
Describe the solution you'd like
Add a new public static method that creates a
StreamOffset
with the hardcoded offset sign.Describe alternatives you've considered
None.
Teachability, Documentation, Adoption, Migration Strategy
Similar to how the existing
.latest(K name)
and.lastConsumed(K name)
methods were used.