[DATAREDIS-712] Reuse of reactive types for multiple subscriptions Created: 05/Oct/17  Updated: 14/Jun/18  Resolved: 14/Jun/18

Status: Closed
Project: Spring Data Redis
Component/s: Core
Affects Version/s: 2.0 GA (Kay)
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Mark Paluch Assignee: Mark Paluch
Resolution: Complete Votes: 0
Labels: lovelace
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
is superseded by DATAREDIS-683 Provide reactive Lua scripting commands Closed
Last updater: Mark Paluch


Currently, command execution allows only a single subscription from a Flux/Mono:

Mono<Long> foo = redisOperations.delete("foo");
foo.subscribe(); // completes normally
foo.subscribe(); // fails because of closed connection

Template API calls assemble publishers that pre-allocate connections and operate on that particular connection. Once the first subscription terminates, the collection is returned and no longer usable for subsequent subscriptions.

Publishers without a subscription stay with the allocated connection which causes a resource leak because the associated connection is never released.

On a different note: Connections are allocated through a synchronous API which may incur blocking.

Comment by Mark Paluch [ 14/Jun/18 ]

Was solved with DATAREDIS-683 since 2.0M3.

Generated at Mon May 25 02:57:42 UTC 2020 using Jira 8.5.4#805004-sha1:0444eab799707f9ad7b248d69f858774aadfd250.