-
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 to StreamOperations
accepting XAddOptions
#2915
Comments
Hi, I am currently using redisTemplate.opsForStream() to operate on Redis streams. When using the add method, I want to support more parameters such as MAXID and MINID. However, it is not supported at the moment. I noticed that RedisStreamCommands already provides XAddOptions, but currently (in version 3.3.X), there is no way to set these options, and only the default None is called. Is it possible to enhance the DefaultStreamOperations.add method to support these parameters? Example |
|
Not exactly sure why you've posted details about |
I want to set the XAddOptions parameter in redisTemplate.opsForStream().add(...) , but there is no method to set the XAddOptions parameter. Is it possible to add the following API |
Ah, I got it. All the screenshots are pretty distracting and contribute a lot of noise to this ticket. I went ahead and removed these. It is fine to add overloads accepting |
StreamOperations
accepting XAddOptions
Hello, @mp911de I've looked through issue and code. I am planning to add interface method Do you expect the client code should be like this? XAddOptions options = XAddOptions.maxlen(1000);
redisTemplate.opsForStream().add("stream", Map.of("key", "value"), options); if this is the way you implied, i'm happy to make a pr with a few tests to support this change. |
HI
The text was updated successfully, but these errors were encountered: