camellia icon indicating copy to clipboard operation
camellia copied to clipboard

camellia-redis-proxy CamelliaDelayQueueServer源码中eventMap的作用

Open fuhaodev opened this issue 2 years ago • 2 comments

Module: camellia-delay-queue Version: v1.2.16 Content: 请教一下作者,CamelliaDelayQueueServer源码中发布有消息ready的通知是先放到eventMap中,再使用一个singleThread轮询去调用redis的publish,为什么不直接publish,如果是为了减少redis远程调用耗时,在将消息放入eventMap之前也有redis的操作。

截屏2023-09-05 10 10 24

fuhaodev avatar Sep 05 '23 02:09 fuhaodev

如果100ms内发了1000条delay-msg,就得publish 1000次,但是现在定时publish就只需要publish 1次

caojiajun avatar Sep 05 '23 02:09 caojiajun

哦这样,明白了,谢谢

fuhaodev avatar Sep 05 '23 02:09 fuhaodev