github zio/zio-kafka v3.2.0

8 hours ago

This is mostly a maintenance release with small bug fixes. It also upgrades the kafka client to 4.1.1 (compatible with most kafka brokers). However, if you care about partition assignors, please read on.

Many thanks for the bug reports and PRs ❤️

Note: version 3.1.1 never made it due to small binary compatibility problems. Use 3.2.0 instead.

👨🏽‍💻 Looking for contributors

For the current maintainers zio-kafka is just for fun; we no longer use this project in our day jobs. If you find it challenging to work on this very interesting code base, please join us on Discord and we will help you where we can.

🚧 Partition assignor changes

If your application uses rebalance-safe-commits, AND it explicitly sets a partition assignor, please read this section. Otherwise, there should be no issues, and you can safely upgrade to 3.2.0.

After some bug reports we discovered that not all kafka's partition assignors can be used in all circumstances. Therefore, zio-kafka can now change the default partition assignor(s), and also disallow invalid partition assignor settings.

First of all, we discovered that kafka's CooperativeStickyAssignor should only be used in combination with rebalance-safe-commits, when the consumer is very very fast — it should be fast enough to process all pre-fetched records within the maximum rebalance time. Determining whether this is the case requires measuring your system and careful consideration of all settings. When this cannot be guaranteed, it is better to use the RangeAssignor. Therefore, when rebalance-safe-commits is enabled, zio-kafka changes the default partition assignors to [RangeAssignor]. If you wish, you can still set the partition assignors to something else, for example kafka's original default: [CooperativeStickyAssignor, RangeAssignor].

Secondly, we discovered that kafka's CooperativeStickyAssignor is incompatible with transactional producing. If you use transactional, zio-kafka now enforces that the CooperativeStickyAssignor is not used when the consumer is constructed.

For more information see #1597.

🚀 Changes

🌱 Dependency updates

🔧 Maintenance

Full Changelog: v3.1.0...v3.2.0

Don't miss a new zio-kafka release

NewReleases is sending notifications on new releases.