spring-boot-starter-data-redis是否支持reactive响应式编程

开源项目SDK:https://github.com/mingyang66/spring-parent

个人文档:https://mingyang66.github.io/raccoon-docs/#/

spring-boot-starter-data-redis: 使用传统的基于阻塞的I/O编程模型,这意味着当你调用Redis操作时,线程将会被阻塞,知道操作完成,这在高并发场景下可能会导致线程资源的良费和响应时间的增加。

spring-boot-starter-data-redis-reactive: 使用响应式编程模型,在响应式编程中,你的操作是异步的,并且基于事件驱动;你可以继续处理其他的事情,而不必等待Redis操作完成;当Redis操作完成时,结果会被发送到一个回调函数或订阅者。

上述描述是spring-boot-starter-data-redis只支持阻塞模式,而不支持基于reactive的响应式编程,但是我通过研究源码及实际操作验证spring-boot-starter-data-redis是支持基于ractive的响应式编程的,并且spring-boot-starter-data-redis和spring-boot-starter-data-redis-reactive两个starter启动器依赖的jar包都是一样的,都依赖了ractor-core,所以个人认为这两个启动器支持的功能都是一样的,没有什么具体的区别。

  • spring-boot-starter-data-redis包依赖
sh 复制代码
|------spring-boot-starter-data-redis
|  |------lettuce-core
|  |  |------netty-common
|  |  |------netty-handler
|  |  |------netty-transport
|  |  |------reactor-core
|  |------spring-boot-starter
|  |------spring-data-redis
  • spring-boot-starter-data-redis-reactive包依赖
sh 复制代码
|------spring-boot-starter-data-redis-reactive
|  |------lettuce-core
|  |------reactor-core
|  |------spring-boot-starter
|  |------spring-data-redis
相关推荐
码农开荒路1 小时前
Redis底层数据结构之字典(Dict)
java·数据结构·数据库·redis
upanddown2 小时前
redis实战——秒杀篇之redisson实现分布式锁
redis
趁你还年轻_3 小时前
Redis大量key集中过期怎么办
数据库·redis·缓存
要阿尔卑斯吗8 小时前
对一个变化的 Set 使用 SSCAN,元素被扫描的情况:
redis
泽韦德10 小时前
【Redis】笔记|第9节|Redis Stack扩展功能
数据库·redis·笔记
清风~徐~来11 小时前
【Redis】类型补充
数据库·redis·缓存
代码探秘者11 小时前
【Redis从入门到精通实战文章汇总】
数据库·redis·缓存
weixin_7488770011 小时前
【Redis实战:缓存与消息队列的应用】
数据库·redis·缓存
R_AirMan19 小时前
结合源码分析Redis的内存回收和内存淘汰机制,LRU和LFU是如何进行计算的?
redis·lfu·lru·内存回收·内存淘汰
趁你还年轻_1 天前
Redis-旁路缓存策略详解
数据库·redis·缓存