[Bug] DLQ topic no just-in-time subscription in topic stats subscriptions map
- 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
Create consumer with deadletter topic support
ensure call nack so message will comes to dead letter topic
check dead letter topic exists
### What did you expect to see?
Subscriptions property not empty
### What did you see instead?
Subscriptions property empty
### Anything else?
P.S actually I come to DLQ issue from another one, but I unable to reproduce or provide steps how to fix unacked messages, unack functionality just stuck sometimes with lost unacked messages when there is high load of processing and some temporary issues happens with pulsar, we understood from our internal logs that issue is with unack and switch it to DLQ, but now I'm not sure that messages will not be lost as subscription don't exists in subscription map response(but this is a part of verification from functional test, so may be not reproduced on real cluster)
It looks that messages can be deleted from Dead Letter topics no matter is it setup in time subscription or not
Consumer setup with dead letter and in time subscription

But from pulsar topic stats there is no subscription info

### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Start by running the reported reproduction: create a consumer with dead-letter topic support, nack a message, and inspect the dead-letter topic stats. Done means the topic stats subscriptions property is populated consistently and the behavior around messages in the dead-letter topic is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100