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
Methods returning reactive types but in reality are implemented synchronously give callers a wrong impression of what's going on in a method. See this section of the "Avoiding Reactor Meltdown" talk describing such methods.
The following is such example. imposterMethod() has a reactive method declaration but isn't doing anything that warrants this. This will result in unnecessary upstream subscriptions.
I'd like to have a BugChecker that identifies such a construct as a common mistake and expects changes.
Considerations
If the method has a reactive chain that starts with {Mono,Flux}#just and calls no method that results in an inner subscription (e.g. Mono#flatMap()), then we should have a Reactor imposter method and such should be flagged.
Participation
I am willing to submit a pull request to implement this improvement.
I'm opening this issue to start a discussion (a) whether this is desired, and (b) how to achieve such a BugChecker.
I can see it guide new-comers to better usage of reactive operators.
The text was updated successfully, but these errors were encountered:
Problem
Methods returning reactive types but in reality are implemented synchronously give callers a wrong impression of what's going on in a method. See this section of the "Avoiding Reactor Meltdown" talk describing such methods.
The following is such example.
imposterMethod()
has a reactive method declaration but isn't doing anything that warrants this. This will result in unnecessary upstream subscriptions.Description of the proposed new feature
I'd like to have a BugChecker that identifies such a construct as a common mistake and expects changes.
Considerations
If the method has a reactive chain that starts with
{Mono,Flux}#just
and calls no method that results in an inner subscription (e.g.Mono#flatMap()
), then we should have a Reactor imposter method and such should be flagged.Participation
I'm opening this issue to start a discussion (a) whether this is desired, and (b) how to achieve such a BugChecker.
I can see it guide new-comers to better usage of reactive operators.
The text was updated successfully, but these errors were encountered: