streamnative / pulsarctl

a CLI for Apache Pulsar written in Go
Apache License 2.0
158 stars 68 forks source link

pulsarctl does not have a way to view messages from a partitioned topic #1623

Open dmonopoly opened 1 month ago

dmonopoly commented 1 month ago

If I try

pulsarctl subscriptions peek my-topic-name my-subscription-name

for a partition topic, I get

code: 405 reason: Peek messages on a partitioned topic is not allowed

And specifying a more specific partition with

pulsarctl subscriptions peek my-topic-name-partition-0 my-subscription-name

just yields code: 404 reason: Message not found

My interest is in seeing the publishTime and eventTime values for many messages between 2 particular timestamp ranges.

kafkactl has a way to view messages like this, across partitions, without issue:

kafkactl consume my-topic --from-timestamp 1727896337000 --to-timestamp 1727896437000 --print-timestamps

If there is a better way to do this, please let me know.