Nordix / hiredis-cluster

C client library for Valkey/Redis Cluster. This project is used and sponsored by Ericsson. It is a fork of the now unmaintained hiredis-vip.
BSD 3-Clause "New" or "Revised" License
88 stars 43 forks source link

Missing commands: BRPOP, BLPOP, BLMOVE, BLMPOP, BRPOPLPUSH #129

Closed youfeiyou closed 1 year ago

zuiderkwast commented 1 year ago

Hello. Can you give more information. Exactly how do you call the function?

youfeiyou commented 1 year ago

auto cc=redisClusterContextInit(); redisClusterSetOptionPassword(cc,"11111111"); redisClusterSetOptionAddNodes(cc,"192.168.1.129:8000,192.168.1.175:8001"); redisClusterConnect2(cc); if(cc==nullptr||cc->err!=0){ srd::cerr << ""<<std::endl; } redisReply* re=(redisReply*)redisClusterCommand(cc,"BRPOP lists key 10"); std::cout << cc->errstr << std::endl;

output: Parse command error. Cmd type: 0 ,State: 5, break position: 13.

zuiderkwast commented 1 year ago

Thanks! Your code looks right. I see now that hiredis-cluster doesn't know BRPOP. It is missing in command.c where all the commands are listed. It seems like all blocking list commands are missing: BLPOP, BLMOVE, BLMPOP, BRPOPLPUSH.

We can add them. If you find more missing commands, we can add them too.