Comments (21)
- L87: Sending the
Subscription
downstream is not recommended, looks like you wantedthis
. - L101: not really necessary unless you want to be very eager.
from reactor-addons.
- The cancelled check onComplete/onError/onNext could/should be a separate non volatile boolean done.
- cancel() could be defensive against double cancellation by checking cancelled, in fact it could be an int volatile + AtomicFieldIntegerUpdater to compareAndSet.
from reactor-addons.
- I would also use a noop like Operators.error(Subscriber, Throwable) subscription for the onSubscribe error case
- the circuitBreaker should be notified of cancel or the circuit would be permanent in some cases (e.g. someone using take(5) just after the operator)
from reactor-addons.
- Eventually the circuit could collect health state from onNext and request events too (received a request at time T, received this amount of value or termination in T2).
from reactor-addons.
Thank you for your comments. I'm not sure if I understood all of them.
- L87 is fixed.
- I thought L101 helps to reduce the number of requests on the childSubscriber.
The cancelled check onComplete/onError/onNext could/should be a separate non volatile boolean done.
The boolean cancelled flags are already separated and volatile? Or do you mean something else?
I would also use a noop like Operators.error(Subscriber, Throwable) subscription for the onSubscribe error case
What do you mean by Operators.error(Subscriber, Throwable)
. Do you have an example?
RxJava does not seem to have that feature.
from reactor-addons.
the circuitBreaker should be notified of cancel or the circuit would be permanent in some cases (e.g. someone using take(5) just after the operator)
The CircuitBreaker is permanent which means that you should have one CircuitBreaker instance per backend system and reuse the instance to secure several streams.
from reactor-addons.
Eventually the circuit could collect health state from onNext and request events too (received a request at time T, received this amount of value or termination in T2).
The CircuitBreaker publishes a stream of events. If a call is successful, it publishes a CircuitBreakerOnSuccessEvent
and if a call fails, it publishes a CircuitBreakerOnErrorEvent
.
It also publishes events about state transitions. But I don't want to publish too many events which might not be interesting for monitoring systems.
The CircuitBreaker can only be used for cold streams and not for hot streams.
from reactor-addons.
Cold stream of scalar volume then or basically promise/mono/single/maybe/completable.
I'd think that in RS it might be interesting to monitor active subscriptions (and so cancelling should be bridged) and their throughput using request/item-received on fixed windows.
from reactor-addons.
Is the cancelled check onComplete/onError/onNext ok like this?
from reactor-addons.
Any progress so far?
from reactor-addons.
@smaldini Is there any guide how to write custom Spring Reactor operators?
I tried to create a custom Reactor operator, but I failed.
from reactor-addons.
We folow he same guidelines as rxjava2 but we haven't done our own guide yet as we are pushing a bit more the API and toolkit until 3.1 now.
One thing tho, having at least a simplified version of such operator (if it was encapsulated as one FluxCircuitBreaker + java parameters vs custom contract) we would welcome it in core probably for Mono/Flux.
from reactor-addons.
@smaldini 3.1 is released, could we get it in now?
@RobWin I wanted to look at your attempt, but unfortunately the source code links are invalid now.
from reactor-addons.
@leonard84 We only have a RxJava addon. See: https://github.com/resilience4j/resilience4j/tree/master/resilience4j-rxjava2/src/main/java/io/github/resilience4j
We need help add support for Reactor.
from reactor-addons.
@RobWin I saw the rxjava2 implementation. You said
We need help add support for Reactor.
but without the prototype code for the reactor support it is hard to see/fix the problems.
from reactor-addons.
@RobWin looks like this largely built on Publisher
/Subscriber
now, so the differences should not be that great, with limited adaptation effort.
from reactor-addons.
@RobWin Any update on this? I'd love to be able to use Reslience4j with Reactor.
from reactor-addons.
I wont't have time to implement it, but we have RxJava2 operators which have been reviewed by @akarnokd.
If would be awesome if someone would like to contribute Reactor operators.
from reactor-addons.
I'd be willing to give it a shot but not sure I'm well versed enough in Resilience4j and Reactor.
from reactor-addons.
Nice. I can invite you into our slack channel if you have questions regarding Resilience4j.
from reactor-addons.
@RobWin isn't this issue redundant, as https://github.com/resilience4j/resilience4j now has a reactor module?
from reactor-addons.
Related Issues (20)
- Switch to Github Actions for CI
- Publish to artifactory using GHA
- Guava's ListenableFuture to Mono/Flux adapter HOT 2
- reactor.retry.Retry is incompatible with the reactor-core reactor.util.retry HOT 1
- pom is empty since split of publications for the gha release HOT 4
- RxJava3Adaptor.monoToSingle causes inconsistent behavior in IntegrationTest and real-world test HOT 4
- MathFlux sumBigDecimal looses scale of BigDecimal HOT 3
- 3.6.0 deprecated removal: CacheFlux and CacheMono
- Removing deprecated processors
- Move reactor.swing.SwtScheduler.java to reactor.swt.SwtScheduler.java HOT 2
- Deprecating reactor-extra's Swing/SwtScheduler (removal in 3.6.0) HOT 2
- Remove kotlin extensions (deprecated since 3.3.0)
- Deprecating Retry (removal in 3.6.0)
- 3.6.0 deprecated removal: Retry
- 3.6.0 deprecated removal: misc (swing/swt, ...)
- RxJava 3.1.x support HOT 8
- Make operators derived from MonoSubscriber either implement QueueSubscription or stop being Fuseable
- RxJava3Adapter.singleToMono() doesn't cascade dispose() calls up the chain to the RxJava disposable
- Suggest reactor version of semaphore implementation HOT 4
- Deprecate Repeat functionality HOT 1
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 reactor-addons.