Skip to content

feat: Add At-Least-Once Fan-Out With Redelivery On Nack - #6

Merged
ThomasHartDev merged 1 commit into
mainfrom
thomas/feat/at-least-once
Sep 4, 2026
Merged

feat: Add At-Least-Once Fan-Out With Redelivery On Nack#6
ThomasHartDev merged 1 commit into
mainfrom
thomas/feat/at-least-once

Conversation

@ThomasHartDev

Copy link
Copy Markdown
Owner

Topic fan-out was still fire-and-forget. If a handler failed, that subscriber never saw the message again. The work queue already retries a single competing consumer. This adds the same guarantee to pub/sub.

ReliableBroker gives each subscriber a private inbox. Publish still copies to everyone, but ack and nack are per copy. A nack (or a thrown handler) comes back to the same subscriber with deliveryCount bumped and redelivered set. Peers who already acked are left alone. Retries stop at maxDeliveryCount so a poison payload cannot spin inside publish. Optional prefetch isolates a slow consumer without stalling the others.

Also puts the DeadLetterQueue exports back on the package index. The work-queue merge had dropped them and the existing DLQ tests could not typecheck.

Closes #5.

Each subscriber gets a private inbox. ack settles that copy. nack
redelivers it to the same subscriber only. Bounded by maxDeliveryCount.

Restore DeadLetterQueue exports dropped from the package index.
@ThomasHartDev
ThomasHartDev merged commit 4733c1a into main Sep 4, 2026
1 check passed
@ThomasHartDev
ThomasHartDev deleted the thomas/feat/at-least-once branch September 4, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

At-least-once topic delivery with redelivery on nack

1 participant