All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ohaoh.redismq-core.0.3.3.source-code.putMessage.lua Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version



-- 无备注版本
local messageZset = KEYS[1];
local messageBodyHashKey = KEYS[2];
local queueSize = ARGV[1];
local size = redis.call('zcard', messageZset);
if size and tonumber(size) >= tonumber(queueSize) then
return -1;
end
for i=2, #ARGV, 4 do
    redis.call('zadd', messageZset, ARGV[i],ARGV[i+1]);
    redis.call("hset", messageBodyHashKey, ARGV[i+2],ARGV[i+3] )
end
return size;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy