Message has no redelivery count if subscription type is Exclusive or Failover
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
**Describe the bug**
`Message.getRedeliveryCount()` is always zero if subscription type is Exclusive or Failove. So we can not take advantage of the `RedeliveryBackoff` which use `redeliveryCount` as a parameter.
I wander if it's a bug or feature. In other word, why only share or key_share subscription type enable subscription message redelivery tracker to send redelivery, as Line:84:
https://github.com/apache/pulsar/blob/b13d15c4d6d795f33c6ed23f920fabbb3eeaf745/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java#L72-L85
Contributor guide
Research direction
Start with pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java around lines 72-85, then trace how the redelivery tracker supplies the count to Message.getRedeliveryCount(). Verify the behavior for Exclusive and Failover subscriptions and ensure RedeliveryBackoff receives the expected redelivery count.
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
- 35/100