Conversation
4 tasks
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#️⃣연관된 이슈
📝작업 내용
QuestionResDTO.java
이벤트 전용 record 3개 추가
QuestionCreatedEvent: 질문 등록 시 SSE로 전파되는 데이터UnderstandingCheckCreatedEvent: 이해도 체크 생성 시 SSE로 전파되는 데이터UnderstandingResponseUpdatedEvent: 이해도 O/X 응답 시 전체 카운트 전파QuestionEventService.java
publishCommentCreated()의 중복 전송 로직을broadcast()로 추출publishQuestionCreated(),publishUnderstandingCheckCreated(),publishUnderstandingResponseUpdated()추가QuestionService.java
createQuestion(): 저장 후publishQuestionCreatedEventAfterCommit()호출createUnderstandingCheck(): 저장 후publishUnderstandingCheckCreatedEventAfterCommit()호출respondUnderstandingCheck(): 응답 처리 후publishUnderstandingResponseUpdatedEventAfterCommit()호출application.yml
max: 200,min-spare: 20으로 명시적 설정참고 사항
EventSource또는fetch기반 SSE 클라이언트로/api/sessions/{sessionId}/questions/events를 구독하면 4가지 이벤트를 수신할 수 있음EventSource대신fetch기반 SSE 클라이언트를 사용해야 함Closes #142