Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a convenience method to support reading of last message from stream #2861

Closed
tishun opened this issue May 24, 2024 · 0 comments · Fixed by #2863
Closed

Provide a convenience method to support reading of last message from stream #2861

tishun opened this issue May 24, 2024 · 0 comments · Fixed by #2863
Labels
status: good-first-issue An issue that can only be worked on by brand new contributors

Comments

@tishun
Copy link
Collaborator

tishun commented May 24, 2024

Feature Request

A new way to read from the last element of the stream was introduced to XREAD with redis/redis#7388

We 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 the XReadArgs.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.

@tishun tishun added the status: good-first-issue An issue that can only be worked on by brand new contributors label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: good-first-issue An issue that can only be worked on by brand new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant