Skip to content

Conversation

@zjxxzjwang
Copy link
Contributor

@zjxxzjwang zjxxzjwang commented Jan 21, 2026

Motivation

Reduce unnecessary getPartitionedTopicMetadata requests when using retry and DLQ topics.

The following scenarios:

  1. When retryLetterTopic is not set but deadLetterTopic is set
  2. When retryLetterTopic is set but deadLetterTopic is not set

These scenarios will trigger the getPartitionedTopicMetadata operation for both the retry topic and DLQ topic, this leads to resource wastage.

Modifications

Perform verification separately. If retryLetterTopic or deadLetterTopic is set, do not proceed to getPartitionedTopicMetadata.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@github-actions
Copy link

@zjxxzjwang Please add the following content to your PR description and select a checkbox:

- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->

@github-actions github-actions bot added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Jan 21, 2026
@zjxxzjwang zjxxzjwang changed the title [improve][broker]Reduce unnecessary creation of retry topic and DLQ topic [improve][client]Reduce unnecessary creation of retry topic and DLQ topic Jan 22, 2026
@hanmz hanmz requested review from hanmz and poorbarcode January 22, 2026 03:19
@hanmz hanmz assigned Jason918, wolfstudy and zjxxzjwang and unassigned Jason918 and wolfstudy Jan 22, 2026
@hanmz hanmz requested review from Jason918 and wolfstudy January 22, 2026 03:20
@hanmz
Copy link
Contributor

hanmz commented Jan 22, 2026

Plz add unit tests to cover this logic.

@zjxxzjwang zjxxzjwang changed the title [improve][client]Reduce unnecessary creation of retry topic and DLQ topic [improve][client]Reduce unnecessary getPartitionedTopicMetadata requests when using retry and DLQ topics. Jan 22, 2026
@zjxxzjwang
Copy link
Contributor Author

Plz add unit tests to cover this logic.

I have added unit testing

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Labels

doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants