fix(ais): AIS WebClient 버퍼 제한 초과(DataBufferLimitException) 수정
This commit is contained in:
부모
0e9ae0626f
커밋
1d764188eb
@ -84,12 +84,17 @@ public class MaritimeApiWebClientConfig {
|
|||||||
log.info("Base URL: {}", maritimeAisApiUrl);
|
log.info("Base URL: {}", maritimeAisApiUrl);
|
||||||
log.info("========================================");
|
log.info("========================================");
|
||||||
|
|
||||||
|
HttpClient httpClient = HttpClient.create()
|
||||||
|
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 10_000) // 연결 타임아웃 10초
|
||||||
|
.responseTimeout(Duration.ofSeconds(60)); // 응답 대기 60초
|
||||||
|
|
||||||
return WebClient.builder()
|
return WebClient.builder()
|
||||||
|
.clientConnector(new ReactorClientHttpConnector(httpClient))
|
||||||
.baseUrl(maritimeAisApiUrl)
|
.baseUrl(maritimeAisApiUrl)
|
||||||
.defaultHeaders(headers -> headers.setBasicAuth(maritimeApiUsername, maritimeApiPassword))
|
.defaultHeaders(headers -> headers.setBasicAuth(maritimeApiUsername, maritimeApiPassword))
|
||||||
.codecs(configurer -> configurer
|
.codecs(configurer -> configurer
|
||||||
.defaultCodecs()
|
.defaultCodecs()
|
||||||
.maxInMemorySize(50 * 1024 * 1024)) // 50MB 버퍼 (AIS GetTargets 응답 ~20MB+)
|
.maxInMemorySize(100 * 1024 * 1024)) // 100MB 버퍼
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
불러오는 중...
Reference in New Issue
Block a user