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.
요구사항
기본
웹소켓 구현하기
spring-boot-starter-websocket
의존성을 추가하세요.implementation 'org.springframework.boot:spring-boot-starter-websocket'
웹소켓 메시지 브로커 설정
SimpleBroker
를 사용하세요./ws
로 설정하고,SockJS
연결을 지원해야 합니다./sub/channels.{channelId}.messages
MessageDto
를 사용하세요./pub/messages
MessageCreateRequest
SSE 구현하기
GET /api/sse
SseEmitter
객체를 스레드 세이프한 메모리 구조에서 안전하게 관리해야 합니다.onCompletion
,onTimeout
,onError
이벤트 핸들러에서 emitter를 제거합니다.Last-Event-ID
를 전송해 이벤트 유실 복원이 가능하도록 해야 합니다.멘토에게