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

Python API: seek(eventtime) #5541

Closed
candlerb opened this issue Nov 2, 2019 · 2 comments · Fixed by #5542
Closed

Python API: seek(eventtime) #5541

candlerb opened this issue Nov 2, 2019 · 2 comments · Fixed by #5542
Labels
type/feature The PR added a new feature or issue requested a new feature

Comments

@candlerb
Copy link
Contributor

candlerb commented Nov 2, 2019

Is your feature request related to a problem? Please describe.
Feature-parity between APIs: Java Consumer and Reader have seek(messageId) and seek(timestamp), but Python has only seek(messageId) in Consumer, and nothing in Reader.

Describe the solution you'd like
Add a new method to Consumer and Reader to seek by timestamp. Or it could test the type of the value passed, or have different named arguments.

Describe alternatives you've considered
N/A

Additional context
Use cases are given in #5537 - e.g. rewind a reader to start at a given time.

@candlerb candlerb added the type/feature The PR added a new feature or issue requested a new feature label Nov 2, 2019
@candlerb
Copy link
Contributor Author

candlerb commented Nov 2, 2019

On further investigation I think some work on C++ API would be needed as well.

  1. C++ API has seek in Consumer but not in Reader (which is where I want it)
  2. Consumer::seek accepts only MessageId as its argument - although I see no reason why it can't be overloaded like its Java counterpart

In terms of the wire protocol, it would need to copy whatever the Java client does for seek(timestamp) - the command is built here.

@aahmed-se
Copy link
Contributor

#5542

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature The PR added a new feature or issue requested a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants