Add Sentinel Spring WebFlux adapter module - #556
Merged
Conversation
sczyh30
force-pushed
the
adapter/spring-webflux
branch
from
March 11, 2019 03:38
fe52e30 to
14e839c
Compare
Codecov Report
@@ Coverage Diff @@
## master #556 +/- ##
============================================
+ Coverage 38.31% 39.38% +1.06%
- Complexity 1158 1210 +52
============================================
Files 267 271 +4
Lines 8414 8499 +85
Branches 1133 1134 +1
============================================
+ Hits 3224 3347 +123
+ Misses 4777 4727 -50
- Partials 413 425 +12
Continue to review full report at Codecov.
|
- The implementation leverages Sentinel Reactor Adapter. Two main components: SentinelWebFluxFilter and SentinelBlockExceptionHandler Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
sczyh30
force-pushed
the
adapter/spring-webflux
branch
from
March 11, 2019 06:09
14e839c to
fdeb4de
Compare
CST11021
pushed a commit
to CST11021/Sentinel
that referenced
this pull request
Nov 3, 2021
[ISSUE alibaba#556]Fix useEpollNativeSelector=true Broker Start Exception
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe what this PR does / why we need it
Add Sentinel Spring WebFlux adapter to support integration with Spring WebFlux (reactive). I've also provided a demo for it.
Does this pull request fix one issue?
Resolves #230
Describe how you did it
SentinelWebFluxFilterto intercept the request and wrap with Sentinel using Sentinel Reactor transformer.SentinelBlockExceptionHandlerthat will handle theBlockExceptionand return a default message body by default.Default message body resembles:
{"code":429,"message":"Blocked by Sentinel: FlowException"}Describe how to verify it
Run the test cases.
Special notes for reviews
Plz run the demo in local to see whether it works correctly.