apache / apache/pulsar

[Bug] DLQ explicit set of topic name create it in public(tenant)/default(namespace)

Open
#19,739 2 comments 0 reactions 0 assignees View on GitHub
Stale type/bug
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.

### Version

2.11.0

### Minimal reproduce step

Ensure explicit set of name in deadLetterTopic
When it is not set DLQ created correctly in same tenant and namespace where original topic exists
When set such name directly it created as
persistent://public/default/test-topic-name-test-subscription-DLQ

.enableRetry(true)
.deadLetterPolicy(
DeadLetterPolicy
.builder()
.maxRedeliverCount(opts.maxRedeliverTimes)
.deadLetterTopic("test-topic-name-test-subscription-DLQ") // TODO
.initialSubscriptionName(sub.name.value)
.build()
)

### What did you expect to see?

DLQ topic should be in same tenant as namespace as original topic

### What did you see instead?

DLQ topic created as
persistent://public/default/test-topic-name-test-subscription-DLQ

### Anything else?

_No response_

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start from the DeadLetterPolicy builder and the explicit deadLetterTopic("test-topic-name-test-subscription-DLQ") call shown in the reproduction. Trace how that topic name is resolved when retry and dead-letter handling create the topic. Done means an explicitly named DLQ is created in the same tenant and namespace as the original topic, with regression coverage for the shown case.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.