WebSocket 전역 연결 전환 및 Mock AI 클라이언트 구현 #172
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
관련 이슈
PR 설명
작업 내용
1. 아키텍처 및 연결 구조 (WebSocket)
ws://{domain}/ws/chat단일 경로로 모든 유저 접속 처리./user/queue/chatUserDestinationMessageHandler를 활용, 세션 ID 기반으로 개별 큐 메시지 분기 처리.2. 구조적 리팩토링 및 파일 삭제
"관심사의 분리" 및 "구현 방식 변경"에 따른 코드 정리.
WebClientFlux 스트리밍 방식에서CompletableFuture단건 응답 방식으로 변경됨에 따라 관리 객체 불필요.TaskManager를 신규 구현하여 비동기 작업 생명주기 및 취소(cancel) 관리.Propagation.NOT_SUPPORTED)로 DB 커넥션 점유 방지.3. Mock AI 구현 (Test Environment)
AnswerClient인터페이스를 통해 AI 요청 규격 추상화.MockAnswerClient를@Primary로 등록하여 실제 AI 서버 없이 동작 테스트 가능하도록 설정.RagAnswerReq: 질문, 히스토리, 모드(Detailed/Concise) 포함.RagAnswerRes: 답변, 근거(ReasoningStep), 관련 링크 ID 포함.4. 보안 및 인증 (Security)
StompHandler에서CONNECT시점에만 토큰 검증 수행.Request/Response 예시
Destination: /user/queue/chat