Pulsar: tiered retry-letter error policy MoveToPulsarRetryTopic (#3182)#3207
Merged
Conversation
…yTopic (#3182) Adds a discoverable error policy DSL mirroring MoveToKafkaRetryTopic: opts.OnException<TransientException>() .MoveToPulsarRetryTopic(5.Seconds(), 30.Seconds(), 2.Minutes()); Each TimeSpan is a retry tier: on failure the message is routed through Pulsar's native retry-letter topic with that delay, reprocessed by the retry consumer once it elapses, and after the last tier exhausts it lands in the dead-letter topic. - MoveToPulsarRetryTopicContinuation (UserDefinedContinuation) self-guards to PulsarListener — failures over any other transport fall back to an inline retry, never cross-transport — and is discoverable in diagnostics. - PulsarTransport wires the policy's per-tier delays onto every Pulsar listener at startup (provisioning the retry-letter producer/consumer + DLQ), and emits startup warnings when (a) non-Pulsar listeners are present, or (b) a Pulsar listener uses a subscription type other than Shared/Key_Shared (where Pulsar message delaying does not work and the policy degrades to an inline retry). Docs: tiered retry-letter policy section + Key_Shared by-key concurrency guidance (the free Pulsar analogue of Kafka sticky by-key processing). Tests: permanent failure walks both tiers then dead-letters (3 deliveries -> DLQ); non-Pulsar listener emits the startup warning. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 23, 2026
Closed
This was referenced Jul 9, 2026
This was referenced Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3182. Part of the Re-Evaluate Pulsar Integration epic #3176.
Adds a first-class, discoverable retry-letter error policy — the Pulsar analogue of
MoveToKafkaRetryTopic:Each
TimeSpanis one retry tier: on failure the message is routed through Pulsar's native retry-letter topic with that delay, reprocessed by the retry consumer once it elapses, and after the last tier is exhausted it lands in the dead-letter topic.How it works
MoveToPulsarRetryTopicContinuation(aUserDefinedContinuation, not an opaqueCustomAction) self-guards toPulsarListener— a failure arriving over any other transport falls back to a normal inline retry, never cross-transport — and is discoverable in diagnostics.PulsarTransportdiscovers the policy at startup and wires its per-tier delays onto every Pulsar listener (provisioning the retry-letter producer/consumer + DLQ), so an explicitRetryLetterQueueing(...)is not also required.Shared/Key_Shared(Pulsar message delaying does not work there).Acceptance criteria
permanent_failure_walks_the_tiers_then_dead_letters: 3 deliveries → 1 dead-lettered).non_pulsar_listener_emits_a_startup_warning).Key_Sharedby-key concurrency (the free Pulsar analogue of Kafka Kafka: opt-in intra-partition concurrency by key (durable, reuse ShardedExecutionBlock) #3140).Tests / build
pulsar_retry_topic_dsl: 2/2 green against a Testcontainers broker.wolverine.slnxbuilds clean in Release.🤖 Generated with Claude Code