106 Star 555 Fork 217

ztp / redisson-spring-boot-starter

 / 详情

redission 使用延迟队列,订阅后会报错

待办的
创建于  
2022-06-01 15:58

org.redisson.client.RedisException: ERR only (P)SUBSCRIBE / (P)UNSUBSCRIBE / QUIT allowed in this context. channel: [id: 0xcdf83f99, L:/28.51.8.114:57688 - R:/10.10.83.61:6379] command: (PING), params: []

订阅redisson 延迟队列

public T getDelayQueue(String queueCode) throws InterruptedException {
RBlockingDeque blockingDeque = redissonClient.getBlockingDeque(queueCode);
// 不加这一行重启后不添加就会消费不到消息
RDelayedQueue delayedQueue = redissonClient.getDelayedQueue(blockingDeque);
T value = blockingDeque.poll(10,TimeUnit.SECONDS);
delayedQueue.destroy();
return value;
}

评论 (0)

xs 创建了任务

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
Java
1
https://gitee.com/ztp/redisson-spring-boot-starter.git
git@gitee.com:ztp/redisson-spring-boot-starter.git
ztp
redisson-spring-boot-starter
redisson-spring-boot-starter

搜索帮助

344bd9b3 5694891 D2dac590 5694891