WEBBOOK CHAPTER

NestJS 11, 시작부터 런칭까지: 10장. Queue와 Outbox

10장. Queue와 Outbox

HTTP transaction 안에서 메시지를 broker에 바로 보내면 DB commit과 발행이 갈라질 수 있다. Outbox row를 같은 transaction에 쓰고 publisher가 queue로 보낸다. consumer는 event id로 중복을 무해하게 만든다.

retry, exponential backoff, dead-letter, poison message, lag alert, replay 권한을 정한다. exactly-once 문구보다 at-least-once+멱등성을 구현한다.