[X] I searched in the issues and found nothing similar.
Read release policy
[X] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
Version
ALL
Minimal reproduce step
Create a namespaces, set ttl time to be less than retention time, for example ttl=60s, retention time=60min.
Continuously send a large number of messages to the topic.
Create a new subscription and start consumption from the latest location. At this time, it can be consumed in time without any backlog.
We adjust the dispatch rate to a smaller threshold(For avoid consuming all backlog messages too quickly). Then we reset cursor to the earliest location.
We found that consumption will start from the earliest position, but after a period of time(in messageExpiryCheckIntervalInMinutes), the intermediate messages will be skipped and go directly to the ttl time position.
What did you expect to see?
Reconsume all messages from reset position in topic.
What did you see instead?
Some messages before ttl cannot be consumed (skip directly)
Anything else?
The reason for this problem is that ttl checks that the consumption position is before ttl, and resets the consume read position to the position of ttl.
Search before asking
Read release policy
Version
ALL
Minimal reproduce step
What did you expect to see?
Reconsume all messages from reset position in topic.
What did you see instead?
Some messages before ttl cannot be consumed (skip directly)
Anything else?
The reason for this problem is that ttl checks that the consumption position is before ttl, and resets the consume read position to the position of ttl.
Are you willing to submit a PR?