We now use the read-only view of Lettuce's Partition object to convert Lettuce RedisClusterNode objects into Spring Data RedisClusterNode. The read-only view is atomic and does not require external synchronization.
Original Pull Request: #384
This commit introduces Coroutines support for ReactiveRedisOperations and its sub-operation APIs via Kotlin extensions that provide
suspendable functions prefixed by `await` or suffixed by `AndAwait` for Mono based APIs.
Extensions for Flux will be added when Kotlin/kotlinx.coroutines#254 will be fixed.
Original Pull Request: #386
We now correctly return host and port from configurations that implement WithHostAndPort instead of always using RedisStandaloneConfiguration.
Original pull request: #385.
LettuceClientConfiguration now enables Lettuce's global timeouts by default to enable timeouts using the reactive API. This change prevents hanging Redis commands due to a blocked connection or when Redis is down. Timeouts are enabled through defaulting so setting ClientOptions or ClusterClientOptions overrides this behavior.
Original Pull Request: #381
Upgrade to Jedis 3.0. Remove reflective sendCommand calls in favor of public Jedis sendCommand API. Invocations with null arguments by introducing overloads with argument defaulting. Fix exception translation because of a changed exception hierarchy. Fix tests and adapt tests to new transactional results that return null values instead if empty collections for nested array responses.
Reformat code. Add author tags. Add note to reference docs.
Original pull request: #374.
We now delete all keys that are emitted by the source publisher when invoking delete(Publisher) and unlink(Publisher). Both methods split incoming keys into chunks of 128 keys to keep a balance between latency and the issued command count.
Previously, delete(Publisher) and unlink(Publisher) only deleted the first key.
Original Pull Request: #379
We now consider the property type in value conversion for constructor arguments to provide the appropriate value type. Previously, we considered the component type which converted a Collection<T> to a single T that caused downstream ClassCastException.
Original Pull Request: #378
We now expose registerNullValueSerializer(…) on GenericJackson2JsonRedisSerializer to allow customization of an externally provided ObjectMapper. NullValueSerializer was previously registered only within a constructor that takes classPropertyTypeName and provided no further possibilities to customize ObjectMapper.
Code wishing to provide a custom ObjectMapper can now call GenericJackson2JsonRedisSerializer.registerNullValueSerializer(objectMapper, …) and perform additional customizations before using ObjectMapper with GenericJackson2JsonRedisSerializer.
Original Pull Request: #376
Stream subscriptions now report reliably their state reflecting regarding activation, cancellation and while being active.
Previously, registering a subscription with immediate cancel could report an inactive subscription although StreamMessageListenerContainer could perform a stream read.
When activating a subscription in StreamMessageListenerContainer, awaiting activation (awaitStart(…)), immediately cancelling the subscription, and reading active state via Subscription.isActive(), Subscription.isActive() could report in this case false. This was because we checked that the status was either running or the stream read has reached event looping. The state was CANCELLED and the task thread had not yet reached the event loop and so there was a gap.
Original Pull Request: #377
The following configuration keys which are not used in RedisClusterConfiguration, are removed from the Javadoc.
* spring.redis.cluster.timeout=5
* spring.redis.cluster.password=foobar
Original pull request: #375.
We now connect asynchronously to expose non-blocking connection behavior for reactive API usage. We also use a non-blocking, asynchronous pool implementation for connections that are used through a reactive API. Shared connection usage, which is blocking on the very first access can be pre-initialized during connection factory initialization instead of initialization on first access:
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory();
connectionFactory.setEagerInitialization(true);
connectionFactory.afterPropertiesSet();
We no longer require offloading of blocking connects to a dedicated scheduler which makes reactive API usage fully non-blocking.
Original Pull Request: #315
We now accept a single collection parameter containing keys for diff/inter/union and their …store methods. Note that diff requires a specific key order to denote the initial set to compare to.
Original pull request: #361.
We now shuffle the set of Redis Cluster nodes before retrieving the topology. This change reduces load on the first node in the known nodes set.
Original pull request: #373.
XREAD does no longer apply a COUNT if the count was left unconfigured on StreamReadOperationsBuilder. This removes the limitation of batch size 1 and allows generally an increased throughput in default configuration.
Original Pull Request: #356
Exract nested Stream types into connection.stream package. Extract common code from Template-API based toObjectRecord handling into StreamObjectMapper.
StreamReceiver and StreamMessageListenerContainer now can emit MapRecord or ObjectRecord for easier consumption of stream records.
Original Pull Request: #356