代码拉取完成,页面将自动刷新
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;
}