-
Notifications
You must be signed in to change notification settings - Fork 985
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
Support 'FCALL' commands to Call Lua-scripts that are loaded as Function in redis #2185
Comments
Hi, |
Also, is there a need to implement FUNCTION LOAD command as well apart from FCALL? |
Any reason you do not define a command interface returning |
Let say if I define a new command, then I'll have to define it's execution flow as well by extending or overriding provided classes, I'm talking about making changes in my own project, not to the lettuce repo. |
Also let me know if there are any development on this redis function support in lettuce, I'm in need of this feature urgently |
I think we're currently not sharing the same understanding. I'm recommending (what the SO answer proposes as well) using Lettuce Command interfaces where you define an interface along with an annotated method, see https://lettuce.io/core/release/reference/index.html#command-interfaces.reactive the details for a reactive variant. You don't need to override any Lettuce-specific methods or types, instead you define your method signature and Lettuce is going to implement it for you. |
so this way I will be able to create FUNCTION LOAD & FCALL command right? but still, I need to write logic on how |
I created a bit of documentation at https://github.com/lettuce-io/lettuce-core/wiki/Scripting-and-Functions#leveraging-scripting-and-functions-through-command-interfaces. Other than that, Lettuce 6.3 will ship with |
Support for FCALL and FUNCTION commands.
Thanks, Mark, When Can we expect the release of Lettuce 6.3? |
Support
FCALL
command, Redis 7 new featureI wrote a Lua script, and loaded it as a function in my Redis using the below command:
cat updateJobAndForwardMsgScript.lua | redis-cli -x FUNCTION LOAD REPLACE
Then I was able to call my function in
redis-cli
as below:FCALL updateJobAndForwardMsg 4 key1 key2 key3 key4 arg1
But when I wanted to implement it in my application using lettuce library I couldn't find any related method to support this new feature in Redis 7.
Here is the link to my StackOverFlow question, where I have described my problem more completly:
Calling loaded Redis functions using lettuce
It could be great if we could easily use this feature as below:
redisCommands.fcall("functionName", KeysNumber, Keys[], ARGS[]);
The text was updated successfully, but these errors were encountered: