[SO-209] feat: 채팅방 CRD & 실시간 채팅 API 추가#89
Merged
nitronium102 merged 26 commits intodevelopfrom Sep 4, 2023
Merged
Conversation
…gMate_BackEnd into feature/SO-209-redis-chat
|
Kudos, SonarCloud Quality Gate passed!
|
lina1919
approved these changes
Sep 4, 2023
Contributor
lina1919
left a comment
There was a problem hiding this comment.
네 확인했습니다! 어려운 부분 추가하시느라 고생 많으셨어요:)
Open
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.








작업 개요
Redis sub/pub 및 Websocket을 이용하여 실시간 채팅 및 채팅방 추가
작업 분류
작업 상세 내용
채팅방 API
[POST] /api/v1/chat/room
[GET] /api/v1/chat/rooms
[GET] /api/v1/chat/room/{roomId}
[DELETE] /api/v1/chat/room/{roomId}
채팅 API
http://{localhost}/stomp
[GET] /api/v1/chat/message/{roomId}
생각해볼 문제
현재는 채팅방 메시지를 전체 조회하고 있지만, 추후에는 개수 제한을 두어야 할 것 같습니다
제가 본 방식은 https://velog.io/@baekgom/WebSocket-Stomp-Redis-%EC%B1%84%ED%8C%85%EB%B0%A9-%EC%9C%A0%EC%A7%80#1-messagedto
[전송] Redis에서는 1시간 후에 삭제되도록 설정 & DB에 저장
[조회] Redis에서 100개 가져오기 -> 만약 없으면 DB에서 100개 가져오기
참고 링크
https://velog.io/@baekgom/WebSocket-Stomp-Redis-%EC%B1%84%ED%8C%85%EB%B0%A9-%EC%9C%A0%EC%A7%80#1-messagedto
https://www.daddyprogrammer.org/
테스트 : https://velog.io/@kny8092/Spring-STOMP%EB%A1%9C-%EC%8B%A4%EC%8B%9C%EA%B0%84-%EC%84%9C%EB%B9%84%EC%8A%A4-%EA%B5%AC%ED%98%84%ED%95%98%EA%B8%B0#config-%EC%84%A4%EC%A0%95%ED%8C%8C%EC%9D%BC