dodo849 / Stomper

A STOMP (Simple Text Oriented Messaging Protocol) socket library for iOS Swift enables real-time communication by allowing clients to send, receive, and subscribe to messages.
MIT License
0 stars 0 forks source link

Retry 로직 #1

Open dodo849 opened 2 months ago

dodo849 commented 2 months ago

⚠️ 문제 1. Retrier 동작 순서


⚠️ 문제 2. Retrier 실행 횟수

상황

Alamofire동작 방식으로 바꿀 시 문제점

dodo849 commented 2 months ago

✅ 문제 1 부분 해결

WebSocketClient StompClient StompProvider
socket connect에 대해 보장 Stomp CONNECT frame에 대해 보장 엔드포인트 연결
프레임 CONNECT DISCONNECT SUBSCRIBE, SEND, etc
동작 Error frame + 소켓 연결 없으면 재시도 > 이후 Subscription 복구 재시도 X 단순 소켓 종료 및 컴플리션 초기화 Error frame + receipt-id 확인 후 일치하는 요청에 대해서만 재시도 > 이후 Subscription 복구
비고 receipt-id가 없는 Error frame은 Connect 재시도로 동작함

✅ 문제 2 해결

dodo849 commented 2 months ago

전체 흐름

image