Repository navigation
Conversation
… on the tenant's cluster MoveToKafkaRetryTopicContinuation produced through listener.Topic.Parent, the default cluster's transport, so a failure on a tenant's listener was moved to the retry topic on the default cluster, retried and dead-lettered there. The tenant cluster's own tier listeners never received anything. The retry record is now produced through the cluster the failing listener consumes, as its dead letters already are. The retry topic is still resolved on the topic's transport, which defines the tier endpoints. The tier topics were already provisioned on every tenant cluster. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the tenant-cluster retry changes.
No open issues 🎉
What changed in this PR
Fixes #6129 by keeping Kafka retry messages on the tenant’s own cluster, preserving broker-per-tenant isolation.
Changes:
- Routes retry records through the listener’s cluster transport.
- Adds regression coverage for tenant identity and retry-record placement.
- Updates documentation to describe per-tenant retries; replay remains default-cluster only.
| File | Description |
|---|---|
| src/Transports/Kafka/Wolverine.Kafka/Internals/MoveToKafkaRetryTopicContinuation.cs | Produces retries on the listener’s cluster. |
| src/Transports/Kafka/Wolverine.Kafka/Internals/KafkaListener.cs | Exposes the cluster transport internally. |
| src/Transports/Kafka/Wolverine.Kafka.Tests/KafkaPerTenantConnectionTests.cs | Adds tenant-cluster retry regression coverage. |
| docs/guide/messaging/transports/kafka.md | Clarifies retry support and replay limitations. |
Review effort: Balanced
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.
Under broker-per-tenant,
MoveToKafkaRetryTopicContinuationproduced throughlistener.Topic.Parent, the default cluster's transport. A failure on a tenant's listener therefore went to the retry topic on the default cluster. The default cluster's tier listener handled it there, and after the last tier dead-lettered it there too. The tenant cluster's own tier listeners, whichAutoProvision()and the tenant-aware tier endpoints already set up, never received anything.Change
KafkaListener's cluster transport (the tenant's own, or else the topic's) is nowinternal ClusterTransport, which was the privateclusterTransport.MoveToErrorsAsyncalready does for dead letters.No registration change was needed.
registerRetryTopicListenersruns beforeprovisionTenantTopicsAsync, so the tier topics are already created on every tenant cluster.Test
KafkaPerTenantConnectionTests.tenant_message_moved_to_a_retry_topic_stays_on_the_tenant_cluster: a tenant message fails once on the source topic and is handled again off the 1 s tier, astenantBboth times.Fixes #6129
🤖 Generated with Claude Code