haskell-works / hw-kafka-client

Kafka client for Haskell, including auto-rebalancing consumers
MIT License
139 stars 50 forks source link

Can alter offsets on RebalanceBeforeAssign. #180

Open robinp opened 2 years ago

robinp commented 2 years ago

This is useful if you don't want the broker to manage group offsets on your behalf, but you rather store the offsets locally (typically in a transaction together with the effects of the processing of that batch of messages).

See the documentation of rd_kafka_conf_set_rebalance_cb (https://docs.confluent.io/2.0.0/clients/librdkafka/rdkafka_8h.html#a10db731dc1a295bd9884e4f8cb199311).

AlexeyRaga commented 2 years ago

Thanks, looks good! It is a breaking change, right? So we should bump the major version?

robinp commented 2 years ago

@alexbiehl if you follow semver strictly, then I guess yes. But let's wait a bit with bumping versions, as I expect to PR one or two smaller fixes yet, if you don't mind. Thanks for the project by the way!

robinp commented 2 years ago

Probably fixes #68.

AlexeyRaga commented 2 years ago

Thanks! Interesting, CI fails. I need to find time to look at it...