diff --git a/docs/data-and-services/collections.md b/docs/data-and-services/collections.md index 767aea109..5670764bd 100644 --- a/docs/data-and-services/collections.md +++ b/docs/data-and-services/collections.md @@ -2033,4 +2033,33 @@ Single> rx = ts.range(201908110501, 201908110508); rx.doOnSuccess(res -> { // ... }).subscribe(); -``` \ No newline at end of file +``` + +### Listeners + +Redisson allows binding listeners per `RTimeSeries` object. This requires the `notify-keyspace-events` setting to be enabled on Redis or Valkey side. + +|Listener class name|Event description | Valkey or Redis
`notify-keyspace-events` value| +|:--:|:--:|:--:| +|org.redisson.api.listener.TrackingListener|Element created/removed/updated after read operation| - | +|org.redisson.api.listener.ScoredSortedSetAddListener|Element created/updated|Ez| +|org.redisson.api.listener.ScoredSortedSetRemoveListener|Element removed|Ez| +|org.redisson.api.ExpiredObjectListener|`RTimeSeries` object expired|Ex| +|org.redisson.api.DeletedObjectListener|`RTimeSeries` object deleted|Eg| + +Usage example: + +```java +RTimeSeries set = redisson.getTimeSeries("obj"); + +int listenerId = set.addListener(new DeletedObjectListener() { + @Override + public void onDeleted(String name) { + // ... + } +}); + +// ... + +set.removeListener(listenerId); +``` diff --git a/docs/integration-with-spring.md b/docs/integration-with-spring.md index 18d7a7180..c8abf58cf 100644 --- a/docs/integration-with-spring.md +++ b/docs/integration-with-spring.md @@ -422,7 +422,7 @@ public class TransactionalBean { _This feature is available only in [Redisson PRO](https://redisson.pro) edition._ -Redisson implements Spring Cloud Stream integration based on the reliable Redis Stream structure for message delivery. To use Redis binder with Redisson you need to add [Spring Cloud Stream](https://spring.io/projects/spring-cloud-stream) Binder library in classpath: +Redisson implements Spring Cloud Stream integration based on the reliable Stream structure for message delivery. To use Redis or Valkey binder with Redisson you need to add [Spring Cloud Stream](https://spring.io/projects/spring-cloud-stream) Binder library in classpath: Maven: ```xml @@ -441,8 +441,8 @@ Compatible with Spring versions below. Spring Cloud Stream | Spring Cloud | Spring Boot -- | -- | -- -4.1.x | 2023.0.x | 3.0.x, 3.1.x, 3.2.x -4.0.x | 2022.0.x | 3.0.x, 3.1.x, 3.2.x +4.1.x | 2023.0.x | 3.0.x - 3.3.x +4.0.x | 2022.0.x | 3.0.x - 3.3.x 3.2.x | 2021.0.x | 2.6.x, 2.7.x (Starting with 2021.0.3 of Spring Cloud) 3.1.x | 2020.0.x | 2.4.x, 2.5.x (Starting with 2020.0.3 of Spring Cloud) @@ -488,7 +488,7 @@ spring.cloud.stream.bindings.feedSupplier-out-0.producer.useNativeEncoding=true ## Spring Data Redis -Integrates Redisson with Spring Data Redis library. Implements Spring Data's `RedisConnectionFactory` and `ReactiveRedisConnectionFactory` interfaces and allows to interact with Redis through `RedisTemplate` or `ReactiveRedisTemplate` object. +Integrates Redisson with Spring Data Redis library. Implements Spring Data's `RedisConnectionFactory` and `ReactiveRedisConnectionFactory` interfaces and allows to interact with Redis or Valkey through `RedisTemplate` or `ReactiveRedisTemplate` object. ### Usage 1. Add `redisson-spring-data` dependency into your project: diff --git a/docs/observability.md b/docs/observability.md index 7a546797f..2aec3c09e 100644 --- a/docs/observability.md +++ b/docs/observability.md @@ -672,6 +672,8 @@ Tracing tracing = Tracing.newBuilder() .addSpanHandler(zipkinSpanHandler) .build(); +Config config = ... // Redisson PRO config object + config.setTracingProvider(new BraveTracingProvider(tracing)); ``` @@ -700,6 +702,8 @@ OpenTelemetrySdk openTelemetrySdk = OpenTelemetrySdk.builder() io.opentelemetry.api.trace.Tracer otelTracer = openTelemetrySdk.getTracerProvider().get("io.micrometer.micrometer-tracing"); +Config config = ... // Redisson PRO config object + config.setTracingProvider(new OtelTracingProvider(otelTracer, openTelemetrySdk.getPropagators())); ```