Add overloads for XAddOptions in StreamOperations#2936
Add overloads for XAddOptions in StreamOperations#2936jinkshower wants to merge 1 commit intospring-projects:mainfrom
Conversation
| } | ||
|
|
||
| return xAdd(Mono.just(addStreamRecord)).next().map(CommandResponse::getOutput); | ||
| } |
There was a problem hiding this comment.
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.
| * | ||
| * @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. |
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
XAddOptionsas an additional parameter foropsForStream.add()TO-BE