pulsar
pulsar copied to clipboard
[Bug] messageTTL on namespaces doesn't work as expected
Search before asking
- [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
3.1.2. It works fine on the 3.0.x
Minimal reproduce step
- Start up standalone
- Adjust the ledger rollover settings to make the ledgers switch fast
managedLedgerMaxEntriesPerLedger=500
managedLedgerMinLedgerRolloverTimeMinutes=0
- Set the retention policy on the namespace
public/default
bin/pulsar-admin namespaces set-retention --size 0 --time 0 public/default
- Set the messageTTL on the namespace
public/default
bin/pulsar-admin namespaces set-message-ttl public/default -ttl 10s
- Produce messages
bin/pulsar-perf produce test -r 100
- Consume one message
bin/pulsar-client consume -s sub test -n 1 -sp Earliest
- Keep watch the stats-internal
bin/pulsar-admin topics stats-internal test
- Because the message expiration check interval is 5min. Set the messageTTL by admin to trigger it immediately
bin/pulsar-admin namespaces set-message-ttl public/default -ttl 10s
What did you expect to see?
The cursor moves forward.
What did you see instead?
The cursor doesn't move.
Anything else?
No response
Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!