Transactional Outbox
トランザクショナルアウトボックス
トランザクション対応アウトボックスは、データの変更とメッセージレコードを1つのローカルデータベーストランザクションで保存します。トランザクションがコミットされた後、リレーが保存されたメッセージを送信します。
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` を 1 つのトランザクションで保存します。リレーは後でイベントを公開します。送信後に行をマークする前で停止すると、再度送信されることがあります。コンシューマはイベント ID によって重複を削除します。
主な部分
- 01ビジネスデータの変更
- 02アウトボックスイベント行
- 031つのローカルトランザクション
- 04リレーまたは変更ストリーム
- 05ブローカーパブリケーション
- 06重複安全なコンシューマ
以下の場合に使用します
コミットされたデータベースの変更が確実にメッセージやイベントにつながる必要がある場合に使用してください。アウトボックスを同じトランザクション内に保持し、リレーを信頼できる独立したプロセスとして動作させてください。
以下の場合は使用しないでください
1回の配信やサービス間の1回の取引と呼ぶな。繰り返しイベント、その順序、中継の遅延、クリーンアップ、安全な重複処理を計画せよ。
コードで使用する名前
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` を 1 つのトランザクションで保存します。リレーは後でイベントを公開します。送信後に行をマークする前で停止すると、再度送信されることがあります。コンシューマはイベント ID によって重複を削除します。 Technical concept or control:トランザクショナルアウトボックス (Transactional Outbox)。 Why it fits:コミットされたデータベースの変更が確実にメッセージやイベントにつながる必要がある場合に使用してください。アウトボックスを同じトランザクション内に保持し、リレーを信頼できる独立したプロセスとして動作させてください。 Do not use it when:1回の配信やサービス間の1回の取引と呼ぶな。繰り返しイベント、その順序、中継の遅延、クリーンアップ、安全な重複処理を計画せよ。 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: トランザクション対応アウトボックスは、データの変更とメッセージレコードを1つのローカルデータベーストランザクションで保存します。トランザクションがコミットされた後、リレーが保存されたメッセージを送信します。 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.