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

Consumer: allow manually setting offset #68

Open
jameshaydon opened this issue May 3, 2018 · 1 comment
Open

Consumer: allow manually setting offset #68

jameshaydon opened this issue May 3, 2018 · 1 comment

Comments

@jameshaydon
Copy link
Contributor

Currently Kafka.Consumer.Subscription.offsetReset only allows setting to Earliest or Latest. Could an explicit offset be added? Implementation would presumably follow:

https://github.com/edenhill/librdkafka/wiki/Manually-setting-the-consumer-start-offset

@AlexeyRaga
Copy link
Member

To implement it in a way that offsets could be provided with subscription we need to re-design the subscription API. Need to think about how to make it conveniently.
And we don't provide the access to the "raw" rebalance callback where you could alter the topic/partition/offset properties. Which can be changed/updated as well, for example instead of

RebalanceEvent -> IO ()

we could accept something like

RebalanceEvent -> IO (Maybe [TopicPartition])

but then it is inconvenient because this sort of a callback doesn't really make sense for, say, BeforeRevoke event...

Something can be done with careful thinking, but in the meantime, you can use seek within your AfterRebalance callback to get the same effect.

Would it solve your immediate issue?

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