http extra 로그 중복 오류 처리 retry 시 logseq+1
This commit is contained in:
+3
@@ -428,9 +428,12 @@ public abstract class HttpClient5AdapterServiceSupport implements HttpClientAdap
|
||||
this.client = HttpClients.custom()
|
||||
.disableDefaultUserAgent()
|
||||
.disableContentCompression()
|
||||
.disableRedirectHandling() // redirect 자동 재전송 비활성화
|
||||
.disableAutomaticRetries() // 429 포함 자동 재시도 비활성화
|
||||
.addRequestInterceptorLast(requestLogInterceptor)
|
||||
.addResponseInterceptorFirst(responseLogInterceptor)
|
||||
.setConnectionManager(connectionManager)
|
||||
.evictExpiredConnections()
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
+11
@@ -12,6 +12,7 @@ import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||
import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
|
||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||
|
||||
import com.eactive.eai.adapter.http.client.HttpClientAdapterServiceKey;
|
||||
import com.eactive.eai.common.util.Logger;
|
||||
|
||||
|
||||
@@ -72,6 +73,16 @@ public class DeadlineAwareRetryExecutor {
|
||||
boolean doRetry = false;
|
||||
|
||||
try {
|
||||
if (attempt > 0) {
|
||||
Integer logProcessNo = (Integer) context.getAttribute(HttpClientAdapterServiceKey.LOG_PROCESS_NO);
|
||||
if (logProcessNo == null || logProcessNo <= 0) {
|
||||
logProcessNo = 200;
|
||||
}
|
||||
logProcessNo++;
|
||||
|
||||
context.setAttribute(HttpClientAdapterServiceKey.LOG_PROCESS_NO, logProcessNo);
|
||||
}
|
||||
|
||||
response = httpClient.execute(request, context);
|
||||
int status = response.getCode();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user