[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:
Supersede
is superseded by DATAREDIS-683 Provide reactive Lua scripting commands Closed
Last updater: Mark Paluch

 Description   

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.



 Comments   
Comment by Mark Paluch [ 14/Jun/18 ]

Was solved with DATAREDIS-683 since 2.0M3.

Generated at Fri Nov 15 03:08:43 UTC 2019 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.