-
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 support for xautoclaim #2316
Comments
Would be nice to have xautoclaim supported. Any news for which version it is planned? |
how this issue,please |
At this point, using xautoclaim causes a direct dependency to the redis client :( |
I've ended up with getting a client from private val xAutoClaimArgs: XAutoClaimArgs<String> =
XAutoClaimArgs.Builder
.xautoclaim(
Consumer.from(consumerGroupName, consumerName),
messageDuration,
"0-0",
).count(messagesToClaim)
private val commands = commands(lettuceConnectionFactory.requiredNativeClient)
private fun commands(client: AbstractRedisClient): RedisClusterCommands<String, String> =
when (client) {
is RedisClient -> {
client.connect().sync()
}
is RedisClusterClient -> {
client.connect().sync()
}
else -> {
throw IllegalArgumentException("Unsupported Redis client type")
}
}
fun reclaim(): MutableList<StreamMessage<String, String>> =
commands.xautoclaim(streamName, xAutoClaimArgs).messages
} |
Hello,
|
@ivan-kripakov-m10 Hi, I started adding this feature as well - it's WiP - feel free to base your work on it or fork my main: e94fdd4 There are some issues related to xautoclaim - for instance, Lettuce does not fully support this command - it does not provide deleted entries. As for your second question - I added new class that stores record id and lists of claimed and deleted entries |
@kkocel Hi, |
hi. I'm using Spring Boot 2.6.6. right now, in order to run the xautoclaim command, I have to get the native lettuce client and use a lettuce command interface . I would prefer to use Spring's higher-level Reactive/StreamOperations interface, but xautoclaim is not currently supported. please add Reactive/StreamOperations support for xautoclaim. on my Spring version, regular xclaim is also not supported in Reactive/StreamOperations, but it's supported in Reactive/StreamCommands. if, for some reason, there is less resistance to add xautoclaim at the Reactive/StreamCommands level, that would also be preferable to what I'm currently doing. thanks!
The text was updated successfully, but these errors were encountered: