Skip to content

Commit 181feb0

Browse files
authored
Add a note about retry filter behavior in documentation (#3534)
* Add a note about retry filter behavior in documentation.
1 parent a6527e2 commit 181feb0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/modules/ROOT/pages/spring-cloud-gateway-server-mvc/filters/retry.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ NOTE: When using the retry filter with a `forward:` prefixed URL, the target end
6969
For example, if the target endpoint is an annotated controller, the target controller method should not return `ResponseEntity` with an error status code.
7070
Instead, it should throw an `Exception` or signal an error (for example, through a `Mono.error(ex)` return value), which the retry filter can be configured to handle by retrying.
7171

72+
NOTE: When using the retry filter, it will retry all filters that come after it. Make sure the results of the filters following the retry filter are as expected when they are executed multiple times.
73+
7274
// WARNING: When using the retry filter with any HTTP method with a body, the body will be cached and the gateway will become memory constrained. The body is cached in a request attribute defined by `ServerWebExchangeUtils.CACHED_REQUEST_BODY_ATTR`. The type of the object is `org.springframework.core.io.buffer.DataBuffer`.
7375

7476
A simplified "shortcut" notation can be added with a single `status` and `method`.

docs/modules/ROOT/pages/spring-cloud-gateway/gatewayfilter-factories/retry-factory.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ NOTE: When using the retry filter with a `forward:` prefixed URL, the target end
5151
For example, if the target endpoint is an annotated controller, the target controller method should not return `ResponseEntity` with an error status code.
5252
Instead, it should throw an `Exception` or signal an error (for example, through a `Mono.error(ex)` return value), which the retry filter can be configured to handle by retrying.
5353

54+
NOTE: When using the retry filter, it will retry all filters that come after it. Make sure the results of the filters following the retry filter are as expected when they are executed multiple times.
55+
5456
WARNING: When using the retry filter with any HTTP method with a body, the body will be cached and the gateway will become memory constrained. The body is cached in a request attribute defined by `ServerWebExchangeUtils.CACHED_REQUEST_BODY_ATTR`. The type of the object is `org.springframework.core.io.buffer.DataBuffer`.
5557

5658
A simplified "shortcut" notation can be added with a single `status` and `method`.

0 commit comments

Comments
 (0)