redis - Lettuce core redis blpop 带来Type mismatch Can't assign non-array value to an array

标签 redis

我用的是Letuce core,下面的代码((4)点)会报错 :“类型不匹配无法将非数组值分配给数组”

    redisListCommands.lpush("service:queue","test1");
    redisListCommands.lpush("service:queue","test2");
    redisListCommands.lpush("service:queue","test3");
    redisListCommands.brpop(123,"service:queue"); // (4) 

最佳答案

尝试

redisListCommands.brpop(123, (Object[]) new String[]{"service:queue"});

但您的初始代码对我来说工作正常。

关于redis - Lettuce core redis blpop 带来Type mismatch Can't assign non-array value to an array,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50905414/

相关文章:

python - Twisted:建议使用需要的 txredisapi 库

data-structures - 以原子方式从 Redis 数据结构中弹出多个值?

mysql - 业力追踪报告 : Should use redis-only or redis-mysql hybrid?

java - 使用 Redis 实现 JMS/AMQP 消息传递模式

redis - 错误 : Connection reset by peer while connecting to Elastic cache using stunnal method

kubernetes - Terraform 污点资源命名约定 (v0.11.13)

google-cloud-platform - 有关如何刷新GCP Memorystore(Redis)DB中的缓存的问题

node.js - 如何为 Sails 应用程序正确设置 native redis 连接?

redis - 使用java维护redis缓存中的日志

database - Redis - 发布/订阅内部