fix(config): legacy retry topic uses deadletter cluster#666
Merged
Conversation
In legacy-config normalization a distinct kafka_retry_topic was registered on DEFAULT_CLUSTER (the main consumer cluster). But retries are produced by the upkeep producer, which is the same producer used for the DLQ and connects to the deadletter topic's cluster (kafka_producer_config -> kafka_producer_cluster). The same-cluster validation then compared the retry topic's mis-assigned DEFAULT_CLUSTER against the deadletter cluster and falsely rejected configs where the main consumer cluster differs from the deadletter cluster. This only diverges when kafka_deadletter_cluster is explicitly set; when it is unset the deadletter cluster falls back to the main address, so the change is a no-op for those pools. For the ingest-profiles-raw pool the main consumer is on kafka-profiles while retry+DLQ are co-located on kafka-small, which surfaced the bug: retry target topic 'taskworker-ingest' is on cluster 'kafka-profiles...', but deadletter topic 'taskworker-ingest-dlq' is on 'kafka-small...'; they share a single producer and must be on the same cluster Register the legacy retry topic on DEADLETTER_CLUSTER so the config model matches the cluster the producer actually connects to. ref STREAM-1042 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
evanh
approved these changes
Jun 2, 2026
enochtangg
approved these changes
Jun 2, 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.
ref STREAM-1042
Follow-up to #663, which added the
normalize_and_validatecheck that the retry target and deadletter topic must resolve to the same cluster (they share the upkeep producer). This fixes a false positive in that check for legacy configs.In legacy normalization a distinct
kafka_retry_topicwas registered onDEFAULT_CLUSTER(the main consumer cluster). But retries are produced by the upkeep producer, which is the same producer used for the DLQ and connects to the deadletter topic's cluster (kafka_producer_config→kafka_producer_cluster). The same-cluster check then compared the retry topic's mis-assigned cluster against the deadletter cluster and rejected configs where the main consumer cluster differs from the deadletter cluster — even though retries would have gone to the deadletter cluster at runtime as intended.Fix: register the legacy retry topic on
DEADLETTER_CLUSTERso the config model matches the cluster the producer actually uses. This only diverges whenkafka_deadletter_clusteris explicitly set; when unset it falls back to the main address, so the change is a no-op for those pools.See
test_legacy_retry_topic_uses_deadletter_clusterfor the repro — it fails with the verbatim production error without the fix.🤖 Generated with Claude Code