[Chat] Redis Stream 기반 채팅 메세지 저장&조회#204
Merged
Merged
Conversation
⭐ JaCoCo CoverageLine Coverage: 5.30% 📄 Coverage DetailsOverall Line Coverage: 5.27% (204 covered / 3872 lines) Package Summary (lowest first)
Lowest Covered Classes (Top 20)
Changed Classes (from this PR)
🔗 Full HTML report: See artifact jacoco-full-html on this run → https://github.com/prgrms-web-devcourse-final-project/WEB7_9_codecrete_BE/actions/runs/20558018198 |
larama-C
reviewed
Dec 29, 2025
| LocalDateTime ticketTime = concert.getTicketTime(); | ||
| if (ticketTime == null) { | ||
| return Duration.ofMinutes(0); | ||
| return Duration.ofMinutes(10); |
Collaborator
There was a problem hiding this comment.
티켓 타임이 존재하지 않는 경우 왜 10분을 반환하는지 알 수 있을까요?
Collaborator
Author
There was a problem hiding this comment.
ticketTime이 없는 경우 TTL을 0으로 두면 매 요청마다 DB 조회가 발생하므로,
불필요한 DB 부하를 방지하고 추후 ticketTime 저장 시 정책이 반영되도록 TTL을 10분으로 했습니다!
| private final UserRepository userRepository; | ||
|
|
||
| private String cacheKey(String email) { | ||
| return "chat:user:" + email; |
Collaborator
There was a problem hiding this comment.
email외에 짧은 식별값을 쓰는 것도 좋을 것 같습니다!
| private String exclusiveBefore(String messageId) { | ||
| String[] parts = messageId.split("-"); | ||
| long time = Long.parseLong(parts[0]); // 밀리초 타임스탬프 | ||
| long seq = Long.parseLong(parts[1]); // 같은 밀리초 내 순번 |
Collaborator
There was a problem hiding this comment.
같은 시간 내에서도 순번을 정하신것 좋은 방법인 것 같습니다
larama-C
approved these changes
Dec 29, 2025
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.
🔗 관련 이슈
🚀 PR 개요
📌 변경 사항
🧪 테스트 방법
📸 스크린샷 (선택)