Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] sse 전송 문제 해결 #140

Merged
merged 5 commits into from
Jan 16, 2024
Merged

[fix] sse 전송 문제 해결 #140

merged 5 commits into from
Jan 16, 2024

Conversation

yonghwankim-dev
Copy link
Member

구현한 것

  • SseEmitterManager 객체의 키값 형태를 포트폴리오 등록번호에서 SseEmitterKey 객체로 변경하였습니다.
    • 서로 다른 클라이언트에서 동일한 포트폴리오 번호를 이용하여 sse 요청시 기존 SseEmitter가 제거되는 문제를 해결하였습니다.
  • 포트폴리오 이벤트 리스너에서 모든 Exception에 대하여 emitter.completeWithError() 메소드를 수행하도록 변경하였습니다.
    • 기존 일부 예외에 대해서만 completeWithError 처리를 하였지만 IllegalStateException 예외 발생시에는 complete 처리가 되지 않아서 제거되지 않은 문제를 해결하였습니다.

- SseEmitterKey 객체 추가
- SseEmitterManager 객체의 해시맵의 키 타입을 SseEmitterKey로 변경
@yonghwankim-dev yonghwankim-dev added the bug Something isn't working label Jan 15, 2024
@yonghwankim-dev yonghwankim-dev self-assigned this Jan 15, 2024
@yonghwankim-dev yonghwankim-dev linked an issue Jan 15, 2024 that may be closed by this pull request
…않는 문제 해결

- PortfolioEventListener에서 예외 발생시 해당 SseEmitter는 해시맵에서 제거되도록 변경하여 sseEmitter가 줄어들지 않는 문제를 해겷하였습니다.
@yonghwankim-dev yonghwankim-dev merged commit be50290 into dev Jan 16, 2024
@yonghwankim-dev yonghwankim-dev deleted the feat/#123-sse branch February 19, 2024 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] sse 전송 시간 문제
2 participants