基于Redis实现的延迟消息队列

上传者: qq599314010 | 上传时间: 2021-07-12 02:41:31 | 文件大小: 24KB | 文件类型: ZIP
#### 整体结构 整个延迟队列由4个部分组成: 1. JobPool用来存放所有Job的元信息。 2. DelayBucket是一组以时间为维度的有序队列,用来存放所有需要延迟的Job(这里只存放Job Id)。 3. Timer负责实时扫描各个Bucket,并将delay时间大于等于当前时间的Job放入到对应的Ready Queue。 4. ReadyQueue存放处于Ready状态的Job(这里只存放JobId),以供消费程序消费。

文件下载

资源详情

[{"title":"( 22 个子文件 24KB ) 基于Redis实现的延迟消息队列","children":[{"title":"delay-queue-master","children":[{"title":"src","children":[{"title":"test","children":[{"title":"java","children":[{"title":"com","children":[{"title":"yangwenjie","children":[{"title":"delayqueue","children":[{"title":"test","children":[{"title":"TestAll.java <span style='color:#111;'> 1.56KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"main","children":[{"title":"resources","children":[{"title":"application.yaml <span style='color:#111;'> 156B </span>","children":null,"spread":false},{"title":"log4j.properties <span style='color:#111;'> 694B </span>","children":null,"spread":false},{"title":"redis.yaml <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"yangwenjie","children":[{"title":"delayqueue","children":[{"title":"utils","children":[{"title":"SnowflakeIdUtil.java <span style='color:#111;'> 438B </span>","children":null,"spread":false},{"title":"RedissonUtils.java <span style='color:#111;'> 4.68KB </span>","children":null,"spread":false},{"title":"SnowflakeIdWorker.java <span style='color:#111;'> 5.54KB </span>","children":null,"spread":false}],"spread":true},{"title":"dto","children":[{"title":"Result.java <span style='color:#111;'> 1.48KB </span>","children":null,"spread":false}],"spread":true},{"title":"core","children":[{"title":"DelayQueueJob.java <span style='color:#111;'> 1.87KB </span>","children":null,"spread":false},{"title":"ScoredSortedItem.java <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"DelayBucketHandler.java <span style='color:#111;'> 2.46KB </span>","children":null,"spread":false},{"title":"DelayQueueJobPool.java <span style='color:#111;'> 1.15KB </span>","children":null,"spread":false},{"title":"DelayBucket.java <span style='color:#111;'> 1.58KB </span>","children":null,"spread":false},{"title":"DelayQueue.java <span style='color:#111;'> 3.17KB </span>","children":null,"spread":false},{"title":"ReadyQueue.java <span style='color:#111;'> 845B </span>","children":null,"spread":false}],"spread":true},{"title":"exception","children":[{"title":"GlobalExceptionHandler.java <span style='color:#111;'> 744B </span>","children":null,"spread":false}],"spread":true},{"title":"web","children":[{"title":"DelayQueueController.java <span style='color:#111;'> 2.24KB </span>","children":null,"spread":false}],"spread":true},{"title":"DelayQueueApp.java <span style='color:#111;'> 562B </span>","children":null,"spread":false},{"title":"listener","children":[{"title":"ApplicationStartup.java <span style='color:#111;'> 893B </span>","children":null,"spread":false}],"spread":false},{"title":"Swagger2.java <span style='color:#111;'> 1.37KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"README.md <span style='color:#111;'> 3.83KB </span>","children":null,"spread":false},{"title":"pom.xml <span style='color:#111;'> 3.77KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明