Version 1.41.0 (2023-08-21)
What's Changed
π¨ Breaking Changes
Note: this version of Sarama has had a big overhaul in its adherence to the use of the right Kafka protocol versions for the given Config Version. It has also bumped the default Version set in Config (where one is not supplied) to 2.1.0. This is in preparation for Kafka 4.0 dropping support for protocol versions older than 2.1. If you are using Sarama against Kafka clusters older than v2.1.0, or using it against Azure EventHubs then you will likely have to change your application code to pin to the appropriate Version.
- chore(config): make DefaultVersion V2_0_0_0 by @dnwe in #2572
- chore(config): make DefaultVersion V2_1_0_0 by @dnwe in #2574
π New Features / Improvements
- Implement resolve_canonical_bootstrap_servers_only by @gebn in #2156
- feat: sleep when throttled (KIP-219) by @hindessm in #2536
- feat: add isValidVersion to protocol types by @dnwe in #2538
- fix(consumer): use newer LeaveGroup as appropriate by @dnwe in #2544
- Add support for up to version 4 List Groups API by @prestona in #2541
- fix(producer): use newer ProduceReq as appropriate by @dnwe in #2546
- fix(proto): ensure req+resp requiredVersion match by @dnwe in #2548
- chore(proto): permit CreatePartitionsRequest V1 by @dnwe in #2549
- chore(proto): permit AlterConfigsRequest V1 by @dnwe in #2550
- chore(proto): permit DeleteGroupsRequest V1 by @dnwe in #2551
- fix(proto): correct JoinGroup usage for wider version range by @dnwe in #2553
- fix(consumer): use full range of FetchRequest vers by @dnwe in #2554
- fix(proto): use range of OffsetCommitRequest vers by @dnwe in #2555
- fix(proto): use full range of MetadataRequest by @dnwe in #2556
- fix(proto): use fuller ranges of supported proto by @dnwe in #2558
- fix(proto): use full range of SyncGroupRequest by @dnwe in #2565
- fix(proto): use full range of ListGroupsRequest by @dnwe in #2568
- feat(proto): support for Metadata V6-V10 by @dnwe in #2566
- fix(proto): use full ranges for remaining proto by @dnwe in #2570
- feat(proto): add remaining protocol for V2.1 by @dnwe in #2573
- feat: add new error for MockDeleteTopicsResponse by @javiercri in #2475
- feat(gzip): switch to klauspost/compress gzip by @dnwe in #2600
π Fixes
- fix: correct unsupported version check by @hindessm in #2528
- fix: avoiding burning cpu if all partitions are paused by @napallday in #2532
- extend throttling metric scope by @hindessm in #2533
- Fix printing of final metrics by @prestona in #2545
- fix(consumer): cannot automatically fetch newly-added partitions unless restart by @napallday in #2563
- bug: implement unsigned modulus for partitioning with crc32 hashing by @csm8118 in #2560
- fix: avoid logging value of proxy.Dialer by @prestona in #2569
- fix(test): add missing closes to admin client tests by @dnwe in #2594
- fix(test): ensure some more clients are closed by @dnwe in #2595
- fix(examples): sync exactly_once and consumergroup by @dnwe in #2614
- fix(fvt): fresh metrics registry for each test by @dnwe in #2616
- fix(test): flaky test TestFuncOffsetManager by @napallday in #2609
π¦ Dependency updates
- chore(deps): bump the golang-org-x group with 1 update by @dependabot in #2542
- chore(deps): bump the golang-org-x group with 1 update by @dependabot in #2561
- chore(deps): bump module github.com/pierrec/lz4/v4 to v4.1.18 by @dnwe in #2589
- chore(deps): bump module github.com/jcmturner/gokrb5/v8 to v8.4.4 by @dnwe in #2587
- chore(deps): bump github.com/eapache/go-xerial-snappy digest to c322873 by @dnwe in #2586
- chore(deps): bump module github.com/klauspost/compress to v1.16.7 by @dnwe in #2588
- chore(deps): bump github.com/eapache/go-resiliency from 1.3.0 to 1.4.0 by @dependabot in #2598
π§ Maintenance
- fix(fvt): ensure fully-replicated at test start by @hindessm in #2531
- chore: rollup fvt kafka to latest three by @dnwe in #2537
- Merge the two CONTRIBUTING.md's by @prestona in #2543
- fix(test): test timing error by @hindessm in #2552
- chore(ci): tidyup and improve actions workflows by @dnwe in #2557
- fix(test): shutdown MockBroker by @dnwe in #2571
- chore(proto): match HeartbeatResponse version by @dnwe in #2576
- chore(test): ensure MockBroker closed within test by @dnwe in #2575
- chore(test): ensure all mockresponses use version by @dnwe in #2578
- chore(ci): use latest Go in actions by @dnwe in #2580
- chore(test): speedup some slow tests by @dnwe in #2579
- chore(test): use modern protocol versions in FVT by @dnwe in #2581
- chore(test): fix a couple of leaks by @dnwe in #2591
- feat(fvt): experiment with per-kafka-version image by @dnwe in #2592
- chore(ci): replace toxiproxy client dep by @dnwe in #2593
- feat(fvt): add healthcheck, depends_on and --wait by @dnwe in #2601
- fix(fvt): handle msgset vs batchset by @dnwe in #2603
- fix(fvt): Metadata version in ensureFullyReplicated by @dnwe in #2612
- fix(fvt): versioned cfg for invalid topic producer by @dnwe in #2613
- chore(fvt): tweak to work across more versions by @dnwe in #2615
- feat(fvt): test wider range of kafkas by @dnwe in #2605
π Documentation
- fix(example): check if msg channel is closed by @ioanzicu in #2479
- chore: use go install for installing sarama tools by @vigith in #2599
New Contributors
- @gebn made their first contribution in #2156
- @prestona made their first contribution in #2543
- @ioanzicu made their first contribution in #2479
- @csm8118 made their first contribution in #2560
- @javiercri made their first contribution in #2475
- @vigith made their first contribution in #2599
Full Changelog: v1.40.1...v1.41.0