Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing subscriptions expire docs #707

Open
worekleszczy opened this issue May 13, 2022 · 3 comments
Open

Confusing subscriptions expire docs #707

worekleszczy opened this issue May 13, 2022 · 3 comments

Comments

@worekleszczy
Copy link

Hello, first of all I really like and enjoy using this tool 🙂

Some time ago I was trying to expire a couple of messaged from pulsar using pulsarctl subscriptions expire. I checked the docs:

ExpireMessages flags:
  -t, --expire-time int   Expire messages older than time in seconds
  -a, --all               Expire all messages

So I executed pulsarctl subscriptions expire -t 5 ... and expected that all messages older than 5 second will be expired, but after some poking around I realised that only one was.

I think that this is a little bit misleading - I though that -t will expire ALL messages older than int but it turned out that if -a is not specified it expire only a single message - my thinking was -a expired ALL messaged no matter what time they were published.

Do you think it would be worth reflecting that behaviour more clearly in the docs?

@nodece
Copy link
Contributor

nodece commented May 13, 2022

There have two uses:

  1. pulsarctl subscription expire --expire-time (expire-time) (topic-name) (subscription-name)
    Expire messages that older than given expire time (in seconds) for a subscription (subscription-name) under a topic
  2. pulsarctl subscriptions expire --all --expire-time (expire-time) (topic-name)
    Expire message that older than given expire time (in second) for all subscriptions under a topic

@worekleszczy
Copy link
Author

@nodece But does it in all cases expire all messages older then expire-time?

@nodece
Copy link
Contributor

nodece commented Jun 11, 2022

Sorry for late response, you are right.

Expires all messages older than given N seconds for all subscriptions of the persistent-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants