kafkactl
kafkactl copied to clipboard
Timestamp based consumption
Description
The fix provides with a new config option to consume from timestamp and also an optional end timestamp.
Fixes #121 (issue)
Type of change
Please delete options that are not relevant.
- [ ] New feature (non-breaking change which adds functionality)
Documentation
- [ ] a usage example was added to
README.md
Hey @nanic thank you for the PR. Can you please add tests for your change? Have a look here: https://github.com/deviceinsight/kafkactl/blob/main/.github/contributing.md#testing-your-changes
You can probably derive your tests from one of the other tests in https://github.com/deviceinsight/kafkactl/blob/main/cmd/consume/consume_test.go
1 Question, 1 error:
- Why "--exit" would be mandatory when using "--from-timestamp"? It should be allowed but optional.
- When using "--end-timestamp", using "--exit" does not make any sense.
The consumer can start consuming from a particular timestamp and it is supposed to be used in tandem with --exit
e.g.:
kafkactl consume my-topic --from-timestamp
There is an optional parameter to give end timestamp e.g.:
kafkactl consume my-topic --from-timestamp
closed in favor of the more complete PR https://github.com/deviceinsight/kafkactl/pull/147