仓库地址:https://github.com/lettuce-io
javaSDK:https://github.com/lettuce-io/lettuce-core/tree/main/src/main/java
-
Reactive API(5.x,6.x)
The last key point of a Publisher is that the underlying processing is not started at the time the Publisher is obtained, rather its started at the moment an observer subscribes or signals demand to the Publisher. This is a crucial difference to a java.util.concurrent.Future, which is started somewhere at the time it is created/obtained. So if no observer ever subscribes to the Publisher, nothing ever will happen.
-
示例:
- request如果未消费完所有Publisher弹出的元素,不会触发onComplete.如果弹出的元素小于request的个数,会自动触发onComplete
- subscriber可以订阅多个Publisher