feat(note): 引入 RocketMQ 实现缓存一致性

- 新增 RocketMQ 配置类,引入自动配置
- 添加 RocketMQ 依赖到 pom.xml 文件
- 定义 MQ 常量接口,包括删除本地缓存和延迟删除 Redis 缓存的主题
- 实现延迟删除 Redis 缓存的消息消费者
- 实现删除本地缓存的广播模式消息消费者
- 在笔记更新服务中集成 RocketMQ,实现延迟双删策略
- 发送异步延时消息用于最终删除 Redis 缓存
- 发送同步广播消息以清除所有实例中的本地缓存
This commit is contained in:
Hanserwei
2025-10-09 17:24:51 +08:00
parent d00933caad
commit 5b19e715ce
7 changed files with 141 additions and 1 deletions

View File

@@ -112,6 +112,12 @@
<artifactId>caffeine</artifactId>
</dependency>
<!-- Rocket MQ -->
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-spring-boot-starter</artifactId>
</dependency>
</dependencies>