Comments (5)
It seems a bit of a shame to lose AutoCloseable. it simplifies client usage, where often the synchronous close is useful with try-with-resources blocks.
from rsocket-java.
@yschimke I would like to hear more of the cases where try-with-resources is useful for real world applications. I would always end up doing Observable.concatWith(socket.close())
(in RxJava
world ofcourse) as one can't really synchronously close the socket, it is always at the completion of an asynchronous call.
Having said that, I think we can always provide a utility method elsewhere which converts asynchronous close()
to synchronous AutoClose
implementation.
from rsocket-java.
technically this wouldn't close until someone request(n) the close - so that could be a little weird.
why not use a CompletableFuture?
from rsocket-java.
@NiteshKant I agree but would probably differentiate between expert users, and normal users.
I think making the simplest most Java idiomatic thing work correctly (but not optimally) is a cost worth paying. e.g. the clarity of the sample code that will be cut and paste everywhere.
It's a lot easier for users to go from correct+simpler -> correct+optimal once they care enough.
from rsocket-java.
0.5.x has close()
and onClose()
methods on ReactiveSocket
. Closing this issue.
from rsocket-java.
Related Issues (20)
- Ability to store session object inside RSocketRequester chain HOT 1
- About JWT authentication and authorization HOT 1
- How to set SETUP setupRoute
- SendUtils onDiscard handler class cast exception HOT 5
- https://maven.pkg.github.com/rsocket/rsocket-java (needs permission to access) HOT 1
- Tcp Example Server and Client in Seperate files doesn't work HOT 5
- NoSuchFieldError: rsocket-core overrides dependency for netty-buffer and therefore clashes with reactor-bom / reactor-netty HOT 2
- ClosedChannelException making RSocket request with invalid credentials HOT 1
- Bump reactor-bom to 2020.0.24 to fix CVE in reactor-netty HOT 2
- 1.1.4 Regression - RejectedSetupException on auth failure results in ClosedChannelException HOT 3
- Releasing memory in ZERO_COPY mode.
- Ongoing flux subscription is not getting cancelled even if the client is closed
- LoadbalanceRSocketClient lacks reconnection and retry functions HOT 1
- Send a message to an already established request-stream connection from the rsocket-server to all signed rscoket-clients except one
- How to keep RSocket connection alive forever. What should be configuration values for keepalive(interval, maxLifeTime) to achieve this? HOT 1
- Update "Supported Core Protocol Features Matrix" to add that Resumption is supported
- Server does not close and re-connect on no keep alive ack issue.
- Rsocket error "java.lang.IllegalStateException: Source has to be ASYNC fuseable" with Spring boot 3.2.x & JDK17 HOT 2
- RSocketRequesterTracingObservationHandler producing netty buffer LEAKs
- throw exception on errorConsumer, client will not finish
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rsocket-java.