Skip to content

Change-data-capture outbox dispatch #48

Closed

Description

@thomhurst

Implement an optional outbox dispatcher that reads PostgreSQL logical replication or SQL Server CDC instead of polling (design §6.4). Keep the table layout compatible with Debezium's outbox event router.

Shipped foundation: #33 (outbox recovery and cleanup, merged in #161). Reuse the existing recovery/cleanup path; it is no longer a blocker. Remaining CDC implementation is tracked in PR #294.

Acceptance criteria

  • CDC dispatch delivers committed outbox rows and recovers after a dispatcher restart without losing messages.
  • Preserve native send semantics, durable settlement, and existing ordered/unordered outbox contracts.
  • Keep the polling dispatcher available and document configuration and CDC prerequisites in website/.
  • Add real database coverage for capture, restart/recovery and duplicate delivery, and preserve the documented Debezium-compatible schema.

See docs/design.md §6.4 and docs/decisions.md.

Activity

  1. added
    phase-4: later
    area: outbox
    P3
    on Oct 31, 2026
  2. thomhurst commented on Nov 1, 2026

    @thomhurst
    OwnerAuthor

    Recorded the existing #33 prerequisite as a native dependency and added acceptance criteria. Fresh origin/main has no CDC dispatcher.

  3. added
    in-progress
    on Nov 2, 2026
  4. thomhurst commented on Nov 2, 2026

    @thomhurst
    OwnerAuthor

    Claimed after re-checking the open issue, its closed #33 prerequisite, native sub-issues and closing PR references. Implementing the PostgreSQL option in the issue's PostgreSQL-or-SQL-Server scope; SQL Server remains planned.

    Native-first evidence: pinned Npgsql 10.0.3 already supplies LogicalReplicationConnection, pgoutput decoding, persistent replication slots and WAL feedback. Source inspected: https://github.com/npgsql/npgsql/blob/v10.0.3/src/Npgsql/Replication/PgOutput/PgOutputAsyncEnumerable.cs and https://github.com/npgsql/npgsql/blob/v10.0.3/src/Npgsql/Replication/ReplicationConnection.cs. Relayer's existing maintenance recovery supplies bounded durable reads, fenced claims, native batch limits, sends and completion. CDC wraps these features rather than implementing another replication or send runtime.

    The implementation captures committed inserts as wake-ups for bounded unordered recovery, catches up durable rows on startup/reconnect, and acknowledges WAL only after database processing commits. Maintenance remains necessary for failed sends, claim expiry and future schedules; ordered rows retain the existing lane dispatcher. The schema stays unchanged. Documentation will give explicit Debezium mappings and identify the existing binary header envelope rather than claim default-column compatibility.

  5. 4 remaining items

  6. thomhurst commented on Nov 10, 2026

    @thomhurst
    OwnerAuthor

    Removed the completed #33 prerequisite after verifying recovery/cleanup on origin/main c548832 (merged in #161). Updated the body to describe it as shipped. CDC remains absent from main and is delivered by open PR #294, whose body already has Closes #48; retained in-progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3area: outboxin-progressphase-4: later

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions