reugn / go-streams

A lightweight stream processing library for Go
https://pkg.go.dev/github.com/reugn/go-streams
MIT License
1.92k stars 157 forks source link

confirm kafka message manually #144

Open nieyanzhai opened 2 months ago

nieyanzhai commented 2 months ago

how to confirm kafka msg received manually so i can reprocess the msg that failed to process

reugn commented 2 months ago

To use the manual committing strategy, disable automatic commits by setting config.Consumer.Offsets.AutoCommit.Enable = false when creating a Kafka source consumer group. More changes are required to the source connector. One option is to include the session with the message sent to the sink for manual commit using custom logic. Remember that the session.Commit() call is blocking.