Merge branch 'dev' into test

This commit is contained in:
chenbowen
2025-11-04 18:50:01 +08:00
6 changed files with 209 additions and 18 deletions

View File

@@ -38,7 +38,7 @@ public class GatewayWebClientConfiguration {
private ReactorClientHttpConnector buildConnector() {
ConnectionProvider.Builder providerBuilder = ConnectionProvider.builder("databus-gateway")
.maxIdleTime(Duration.ofMillis(maxIdleTimeMillis));
.maxIdleTime(Duration.ofMillis(maxIdleTimeMillis));
if (evictInBackgroundMillis > 0) {
providerBuilder.evictInBackground(Duration.ofMillis(evictInBackgroundMillis));
}

View File

@@ -47,6 +47,7 @@ public class HttpStepHandler implements ApiStepHandler {
private final ExpressionExecutor expressionExecutor;
private static final Duration RETRY_DELAY = Duration.ofMillis(200);
private static final int RETRY_ATTEMPTS = 3;
private static final Set<String> DEFAULT_FORWARDED_HEADERS = Set.of(
"authorization",
@@ -388,7 +389,7 @@ public class HttpStepHandler implements ApiStepHandler {
}
private Mono<Object> applyResilientRetry(Mono<Object> responseMono, ApiStepDefinition stepDefinition) {
return responseMono.retryWhen(Retry.fixedDelay(1, RETRY_DELAY)
return responseMono.retryWhen(Retry.fixedDelay(RETRY_ATTEMPTS, RETRY_DELAY)
.filter(this::isRetryableException)
.doBeforeRetry(signal -> {
if (log.isWarnEnabled()) {