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

How to set offset to a specified value in Initialization #1610

Closed
BabySid opened this issue Feb 12, 2020 · 3 comments
Closed

How to set offset to a specified value in Initialization #1610

BabySid opened this issue Feb 12, 2020 · 3 comments

Comments

@BabySid
Copy link

BabySid commented Feb 12, 2020

value of c.Consumer.Offsets.Initial must be OffsetNewest or OffsetOldest.

But in some cases, I need to comsume message from a specified offset.

i read the code but have not found method to solution my problem.

somebody who knows help me..thanks..

sorry for my poor english :(

@dnwe
Copy link
Collaborator

dnwe commented Feb 12, 2020

@blackfox1983 I think you are looking for this?https://github.com/Shopify/sarama/blob/6fb86a44d5915dcfd42af71a4c99674bb55650ca/consumer.go#L60-L64

@d1egoaz
Copy link
Contributor

d1egoaz commented Feb 12, 2020

@blackfox1983 your English is great, don't worry about that.

Regarding the question, one importan thing from @dnwe response, is that this is only supported by the low level consumer and it's not supported by ConsumerGroups

@d1egoaz d1egoaz closed this as completed Feb 12, 2020
@Jianli-lin
Copy link

Also hope we can support set offset for ConsumerGroup

Or we can commit offset manually. (#1570)

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

4 participants