Skip to content

[feat] 채팅 알림 DLQ / DLX 적용#268

Merged
mannaKim merged 6 commits intodevfrom
feat/chat
May 2, 2025
Merged

[feat] 채팅 알림 DLQ / DLX 적용#268
mannaKim merged 6 commits intodevfrom
feat/chat

Conversation

@mannaKim
Copy link
Copy Markdown
Contributor

@mannaKim mannaKim commented May 2, 2025

🔗 Issue Number

close #257

📝 작업 내역

  • RabbitConstant에 CHAT_DLX, CHAT_DLQ 상수 추가
  • RabbitConfig에 chat DLX, DLQ, 바인딩 설정 추가
  • ChatDlqReprocessor 클래스 생성
  • ChatRetryService 클래스 생성 및 재처리 로직 구현

💡 PR 특이사항

📸 스크린샷

  • 1번째 재처리 실행
    Image
  • 4번째 재처리 실행
    Image

mannaKim added 4 commits May 1, 2025 15:48
- chat.queue에 x-dead-letter-exchange, x-dead-letter-routing-key 설정
- CHAT_DLX, CHAT_DLQ 상수 및 바인딩 설정 추가
- ChatDlqReprocessor 클래스 생성
- ChatRetryService 클래스 생성 및 retry-count 헤더 기반 재처리 로직 구현
- 메시지 발행 실패 시 AmqpRejectAndDontRequeueException 발생하도록 수정
- ChatRetryService의 rabbitTemplate.send 매개변수 교체 (chat exchange/routingKey)
- RabbitConstant에 채팅 관련 알림 상수 수정
@pshshsh
Copy link
Copy Markdown
Contributor

pshshsh commented May 2, 2025

고생하셨습니다!

Copy link
Copy Markdown
Contributor

@3uomlkh 3uomlkh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다.👍🏻
저도 RetryService로 나눠놔야겠네요..


@Bean
public Binding chatDlqBinding() {
return BindingBuilder.bind(chatDlq()).to(chatDlx()).with(CHAT_DLQ);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

위에 유리님께서 생성해주신 bind() 메서드 사용하시면 될 것 같습니다!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 알려주셔서 감사합니다!
반영해서 테스트 후 push 했습니다.

mannaKim added 2 commits May 2, 2025 11:50
- chatBinding과 chatDlqBinding에서 Queue, Exchange를 메서드 직접 호출 방식에서 파라미터 기반으로 리팩토링
@mannaKim
Copy link
Copy Markdown
Contributor Author

mannaKim commented May 2, 2025

저도 RetryService로 나눠놔야겠네요..

아 그렇네요
RetryQueue 차이가 아니라 서비스 분리 차이일 수도 있겠군요..!🤔

@mannaKim mannaKim merged commit b4577f9 into dev May 2, 2025
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.

[FEATURE] 채팅 알림 DLQ + DLX 적용

3 participants