yangwenjie88 / delay-queue

redis实现延迟消息队列
277 stars 135 forks source link

请问可以单机redis部署吗,不走集群。 #8

Open hjs557523-rgb opened 4 years ago

hjs557523-rgb commented 4 years ago

请问可以单机redis部署吗,不走集群。如果可以的话,需要修改哪些配置呢?

yangwenjie88 commented 4 years ago

目前是不支持的,自己修改一下应该问题不大

ruoguang commented 2 years ago

单机版只需要修改RedissonUtils静态块即可 static { try { String address = "redis://%s:%d"; Config config = new Config(); config.useSingleServer() .setAddress(String.format(address, "xxx",6379)) .setDatabase(0); long startTime = System.currentTimeMillis(); redissonClient = Redisson.create(config); long endTime = System.currentTimeMillis(); logger.info(" initialization RedissosnClient use {}ms",endTime-startTime); logger.info(" redisconfig:{} ",config.toYAML()); }catch (Exception e){ logger.error(" initialization RedissosnClient error :",e); }

}