Sarama: commit offset manually when using consumer group

Created on 21 Nov 2018  Â·  7Comments  Â·  Source: Shopify/sarama

Versions

Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Sarama Version:1.19.0
Kafka Version: 0.10.2.1
Go Version:1.10

Configuration

What configuration values are you using for Sarama and Kafka?

Logs

When filing an issue please provide logs from Sarama and Kafka if at all
possible. You can set sarama.Logger to a log.Logger to capture Sarama debug
output.

Problem Description

Hi,
I need to ability to commit offsets immediately when using sarama consumer group . Is there any way to do that?
Any plans to support it?

Thanks

Feature request enhancement help wanted stale

Most helpful comment

Thanks @d1egoaz. I have time this month to work on this, I will come out with a PR in the next 2 weeks :)

All 7 comments

Are you expecting MarkOffset functionality on consumer messages? This is supported:
https://github.com/Shopify/sarama/blob/v1.21.0/consumer_group_test.go#L15

I'm pretty sure author was referring to explicit commit, rather than just marking the offset internally. We would also like to have this feature!

I also want to submit an offset for each message I consume. When the program is suddenly interrupted, those who have consumed will not be consumed again, instead of submitting an offset at intervals of 'Config.Consumer.Offsets.CommitInterval'

Can I poke at it, if no one else is looking at it atm? @d1egoaz

sure @ankitm123 ! thanks!

Thanks @d1egoaz. I have time this month to work on this, I will come out with a PR in the next 2 weeks :)

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur.
Please check if the master branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.

Was this page helpful?
0 / 5 - 0 ratings