Transactional Outbox
트랜잭션 아웃박스
트랜잭션 아웃박스는 데이터 변경과 메시지 기록을 하나의 로컬 데이터베이스 트랜잭션으로 저장합니다. 릴레이는 트랜잭션이 커밋된 후 저장된 메시지를 전송합니다.
local transaction(business row + outbox row) -> relay/CDC -> broker -> idempotent consumerorders✓order_2048outbox✓evt_784local transaction(business row + outbox row) -> relay/CDC -> broker -> idempotent consumerJOB다른 예시
체크아웃은 주문 `984`과 아웃박스 이벤트 `OrderCreated:984`를 하나의 트랜잭션으로 저장합니다. 중계기는 나중에 이벤트를 발행합니다. 만약 전송 후 행을 표시하기 전에 중지되면, 다시 전송할 수 있습니다. 컨슈머는 이벤트 ID로 중복을 제거합니다.
주요 부분
- 01비즈니스 데이터 변경
- 02아웃박스 이벤트 행
- 03하나의 로컬 거래
- 04릴레이 또는 변경 스트림
- 05브로커 게시
- 06중복 안전 소비자
사용할 때
커밋된 데이터베이스 변경이 메시지나 이벤트로 신뢰성 있게 이어져야 할 때 사용하세요. 아웃박스(outbox)를 동일한 트랜잭션 안에 두고 릴레이(relay)를 자체 신뢰 가능한 프로세스로 운영하세요.
다음 경우에는 사용하지 마세요
이를 단 한 번의 배달이나 서비스 간 단일 거래라고 부르지 마세요. 반복 이벤트, 순서, 중계 지연, 정리, 안전한 중복 처리 계획을 세우세요.
코드에서 사용된 이름
local transaction(business row + outbox row) -> relay/CDC -> broker -> idempotent consumer 출시하기 전에
Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.
Outcome:Complete the task with 트랜잭션 아웃박스 (Transactional Outbox)。 User context:체크아웃은 주문 `984`과 아웃박스 이벤트 `OrderCreated:984`를 하나의 트랜잭션으로 저장합니다. 중계기는 나중에 이벤트를 발행합니다. 만약 전송 후 행을 표시하기 전에 중지되면, 다시 전송할 수 있습니다. 컨슈머는 이벤트 ID로 중복을 제거합니다. Technical concept or control:트랜잭션 아웃박스 (Transactional Outbox)。 Why it fits:커밋된 데이터베이스 변경이 메시지나 이벤트로 신뢰성 있게 이어져야 할 때 사용하세요. 아웃박스(outbox)를 동일한 트랜잭션 안에 두고 릴레이(relay)를 자체 신뢰 가능한 프로세스로 운영하세요. Do not use it when:이를 단 한 번의 배달이나 서비스 간 단일 거래라고 부르지 마세요. 반복 이벤트, 순서, 중계 지연, 정리, 안전한 중복 처리 계획을 세우세요. Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary):하나의 공식 표준이 전체 용어를 통제하지 않음. 의미는 팀, 플랫폼 또는 프레임워크마다 달라질 수 있음. Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.
이 요청을 확인하세요
Review how 트랜잭션 아웃박스 (Transactional Outbox) is used now. Definition: 트랜잭션 아웃박스는 데이터 변경과 메시지 기록을 하나의 로컬 데이터베이스 트랜잭션으로 저장합니다. 릴레이는 트랜잭션이 커밋된 후 저장된 메시지를 전송합니다. Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.