-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add overloads for XAddOptions in StreamOperations #2936
Add overloads for XAddOptions in StreamOperations #2936
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please review this pr and if this needs some changes, I will be happy to amend it!
} | ||
|
||
return xAdd(Mono.just(addStreamRecord)).next().map(CommandResponse::getOutput); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the reason why I wrote somewhat verbose method in here is
unlike JedisStreamCommands
or LettuceStreamCommands
which both have a method accepting (MapRecord<byte[], byte[], byte[]> record, XAddOptions options)
xAdd(Publisher commands) in LettuceReactiveStreamCommands
expects that Publisher already has variables of XAddOptions
.
ex) maxlen, isApproxiateTrimming...
so I placed the decapsulation of XAddOptions here.
I thought of changing AddStreamRecord to have variable priavte final XAddOptions options
so that LettuceReactiveStreamCommands
can delegate the decapsulation to other class
but I thought this exceeds the scope of this issue.
/** | ||
* Add stream record with given {@literal body} to {@literal key}. | ||
* | ||
* @param commands must not be {@literal null}. | ||
* @return {@link Flux} emitting the {@link RecordId} on by for for the given {@link AddStreamRecord} commands. | ||
* @return {@link Flux} emitting the {@link RecordId} on by for the given {@link AddStreamRecord} commands. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed typo
5b50789
to
f4755e5
Compare
e667f58
to
3130562
Compare
3130562
to
f320d66
Compare
@jinkshower looks good to me :) |
Hello, @christophstrobl. Could you please take some time to review this PR when you have a moment? I'm not entirely confident about some of the changes I've made, and your feedback would be incredibly valuable to me. |
@jinkshower thanks for the heads up. |
Add new method to BoundStreamOperations and remove add accepting a Publisher. Original Pull Request: #2936
@jinkshower thank you for your contribution. Merged to main development line. |
Closes #2915
After this change, the client can use
XAddOptions
as an additional parameter foropsForStream.add()
TO-BE