You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now RSocketRequester.Builder uses the connect method as a terminal operation which builds a Mono<RSocketRequester as of now this method wraps doConnect with extra Mono.defer which seems to be a legacy solution to defer of some heavy internals allocation.
As of now, this method seems to be redundant and somewhat stops to use one of the key features of vanilla RSocket like reconnect which allows the usage of the same Mono<RSocket> instance in order to access the same cached connection.
Unfortunately, because of the Mono.defer(() -> doCancel() the underlying mono is not directly propagated to the user, hence all subsequent subscriptions create new connections instead of the usage of the cached (assumed the reconnect feature is enabled)
rstoyanchev
changed the title
Improves the connect method of RSocketRequester.Builder
Avoid re-creating RSocketRequester instance per subscriber
Jun 29, 2020
Right now
RSocketRequester.Builder
uses theconnect
method as a terminal operation which builds aMono<RSocketRequester
as of now this method wrapsdoConnect
with extraMono.defer
which seems to be a legacy solution to defer of some heavy internals allocation.As of now, this method seems to be redundant and somewhat stops to use one of the key features of vanilla
RSocket
likereconnect
which allows the usage of the sameMono<RSocket>
instance in order to access the same cached connection.Unfortunately, because of the
Mono.defer(() -> doCancel()
the underlying mono is not directly propagated to the user, hence all subsequent subscriptions create new connections instead of the usage of the cached (assumed thereconnect
feature is enabled)Expected
to behave approximately identical to
Actual
connect method wraps
into
so
reconnect
does not work as expectedThe text was updated successfully, but these errors were encountered: