Skip to content

feat(chat): 채팅방 채팅 메세지 전달 로직 디버깅 (#78)#172

Merged
jaehyeok-code merged 1 commit intodevfrom
feat/#78
Aug 26, 2025
Merged

feat(chat): 채팅방 채팅 메세지 전달 로직 디버깅 (#78)#172
jaehyeok-code merged 1 commit intodevfrom
feat/#78

Conversation

@jaehyeok-code
Copy link
Contributor

@jaehyeok-code jaehyeok-code commented Aug 26, 2025

Summary by CodeRabbit

  • Refactor
    • 채팅 메시지와 알림을 WebSocket을 통해 토픽으로 직접 송신하도록 전송 경로를 단순화했습니다.
    • 컨트롤러와 서비스에서 중간 브로커 의존을 제거해 실시간 전달 흐름을 일원화했습니다.
    • 결과적으로 메시지·알림이 더 즉시 전송되며 전송 지연이 완화될 수 있습니다.

@jaehyeok-code jaehyeok-code self-assigned this Aug 26, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 26, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Redis 기반 채팅 경로를 전면 비활성화하고, STOMP WebSocket 직접 전송으로 전환. Redis 관련 @Component/@configuration 등록을 주석 처리하고, 컨트롤러와 서비스에서 Redis 퍼블리시 호출을 제거하여 messagingTemplate.convertAndSend(...)로 즉시 브로드캐스트하도록 변경.

Changes

Cohort / File(s) Summary of changes
Redis 구성요소 비활성화
.../domain/chat/bus/ChatRedisPublisher.java, .../domain/chat/bus/ChatRedisSubscriber.java, .../domain/chat/bus/RedisPubSubConfig.java
클래스의 Spring 등록 비활성화: @Component/@Configuration를 주석 처리하여 빈 등록 중단. 나머지 로직은 유지되나 사용 경로에서 배제.
메시징 컨트롤러 전송 경로 전환
.../domain/chat/controller/ChatMessagingController.java
Redis 퍼블리시 의존성/호출 제거(주석). /topic/chat/{roomId}messagingTemplate.convertAndSend(...) 직접 호출로 교체.
알림 컨트롤러 전송 경로 전환
.../domain/chat/controller/ChatNotificationController.java
Redis 퍼블리시 의존성/호출 제거(주석). WebSocket 직접 브로드캐스트로 통일.
알림 서비스 전송 경로 전환
.../domain/chat/service/Impl/ChatNotificationServiceImpl.java
chatRedisPublisher.publishToRoom(...) 제거(주석) 후 messagingTemplate.convertAndSend(...) 즉시 전송으로 일원화. 트랜잭션/저장 로직은 유지.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant C as Client
  participant MC as ChatMessagingController
  participant S as SimpMessagingTemplate
  Note over MC: Redis 경로 비활성화
  C->>MC: SEND /app/chat/{roomId} (payload)
  MC->>S: convertAndSend("/topic/chat/{roomId}", payload)
  S-->>C: STOMP MESSAGE (broadcast to subscribers)
Loading
sequenceDiagram
  autonumber
  participant P as Producer (Service/Controller)
  participant DB as ChatMessageService (save)
  participant S as SimpMessagingTemplate
  Note over P: After-commit 흐름 유지(저장 + 브로드캐스트)
  P->>DB: save(message)
  DB-->>P: saved(message)
  P->>S: convertAndSend("/topic/chat/{roomId}", payload)
  S-->>P: delivered to subscribers
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • hwichoi0317
  • Kim-Jaehyun0328
  • wjkim9
  • roode1017

Poem

토끼는 채팅 버스를 살짝 접고, 홉!
레디스 숲은 잠시 쉬고, 웹소켓 길로 쏙—
메시지는 즉시 둥실 떠가네.
방마다 톡톡, 종소리처럼 전해져,
귀를 쫑긋, “지금 바로!” 띵동! 🥕✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between be1395a and 898db48.

📒 Files selected for processing (6)
  • backendProject/src/main/java/likelion/mlb/backendProject/domain/chat/bus/ChatRedisPublisher.java (1 hunks)
  • backendProject/src/main/java/likelion/mlb/backendProject/domain/chat/bus/ChatRedisSubscriber.java (1 hunks)
  • backendProject/src/main/java/likelion/mlb/backendProject/domain/chat/bus/RedisPubSubConfig.java (1 hunks)
  • backendProject/src/main/java/likelion/mlb/backendProject/domain/chat/controller/ChatMessagingController.java (3 hunks)
  • backendProject/src/main/java/likelion/mlb/backendProject/domain/chat/controller/ChatNotificationController.java (4 hunks)
  • backendProject/src/main/java/likelion/mlb/backendProject/domain/chat/service/Impl/ChatNotificationServiceImpl.java (4 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/#78

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jaehyeok-code jaehyeok-code merged commit 50ec78e into dev Aug 26, 2025
1 check was pending
@jaehyeok-code jaehyeok-code deleted the feat/#78 branch August 26, 2025 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant