1. 提高 databus api 的网络失败重试次数,避免复用旧链接导致的 connection reset 错误

2. 兼容顶级组织同步时的组织编码生成逻辑
This commit is contained in:
chenbowen
2025-11-04 14:43:53 +08:00
parent b98f605dfd
commit 811270a4c5
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()) {