eolivelli opened a new issue #9082: URL: https://github.com/apache/pulsar/issues/9082
**Describe the bug** When the message expiry check wakes up (every 5 minutes by default) it only expires a single message even if many (or all) messages in a subscription are past their expiry time. This means that expired messages remain in the subscription and can be delivered to consumers long past their expiry time. **To Reproduce** Commands to reproduce the issue with pulsar standalone: ``` pulsar-admin namespaces set-message-ttl -ttl 30 public/default bin/pulsar-perf consume -s ttl public/default/timeToLive ctrl-c bin/pulsar-perf produce -s 50 -r 1000 -m 10000 -bm 1 public/default/timeToLive bin/pulsar-admin topics unload public/default/timeToLive wait 30 seconds.... pulsar-admin topics expire-messages -t 30 -s ttl persistent://public/default/timeToLive pulsar-admin topics expire-messages -t 30 -s ttl persistent://public/default/timeToLive pulsar-admin topics expire-messages -t 30 -s ttl persistent://public/default/timeToLive ``` each time it expires only one message **Expected behavior** The broker expires as many messages as possible. **Additional context** Observed in 2.6.x and in current master (2.8.0) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
