PackageTrack
Sign in Get early access

kafka-protocol

Implementation of Kafka wire protocol.

0.18.0 7.4M downloads/mo #3683 most downloaded on crates.io tychedelia/kafka-protocol-rs

What this package is like to depend on

Last release 3 days ago

20 Aug 2026

Release timing varies

gaps range from 2 weeks to 9 months

Nearly every release is documented

notes for 26 of 26 stable releases

Nothing withdrawn

no release was ever pulled

5 years old

26 releases · first in 2021

3 releases in the last 12 months

see the full history below

Release timeline

26 releases · Dec 2021 to Aug 2026
2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 26
  1. 0.18.0 20 Aug 2026
    Release notes

    What's Changed

    Breaking changes ⚠️

    Fixes

    Features

    Dependencies

    New Contributors

    Full Changelog: 0.17.0...0.18.0

    Open source →
    Release notes

    Breaking changes ⚠️

    • feat: add KIP-534 Batch attribute delete_horizon by @zac-torkelson in https://github.com/kafka-protocol-rs/kafka-protocol-rs/pull/157

    Fixes

    • fix: snappy decompress corrupts data when Xerial magic check fails by @StevenLeRoux in https://github.com/kafka-protocol-rs/kafka-protocol-rs/pull/149
    • fix: decode/encode record timestampDelta as VarLong (i64) instead of VarInt (i32) by @hadiezatpanah in https://github.com/ kafka-protocol-rs/kafka-protocol-rs/pull/159

    Features

    • Make ResponseError fn const by @allevo in https://github.com/kafka-protocol-rs/kafka-protocol-rs/pull/153
    • Expose batch decode info by @jakubdyszkiewicz in https://github.com/kafka-protocol-rs/kafka-protocol-rs/pull/150
    Open source →
  2. 0.17.0 27 Nov 2025
    Release notes

    What's Changed

    Full Changelog: 0.16.0...0.17.0

    Open source →
    Release notes
    • Breaking change:
      • change snappy compression to:
        • encode using the upstream java algorithm
        • and decode by autodetecting the upstream java algorithm or true snappy algorithm (previous kafka-protocol-rs encoding implementation)
      • This change makes it possible to decompress bytes compressed by the upstream java
    • Fix ApiKey::iter which would terminate early in 0.16.0
    Open source →
  3. 0.16.0 10 Sep 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 0.15.1...0.16.0

    Open source →
    Release notes
    • Added support for kafka 4.0
      • deprecated message types were removed in kafka 4.0 and those types have also been removed from this crate.
      • removed support for message sets v0 and v1
    Open source →
  4. 0.15.1 12 May 2025
    Release notes

    What's Changed

    Full Changelog: 0.15.0...0.15.1

    Open source →
    Release notes
    • Ensure bytes dependency is at least 0.10.1
    Open source →
  5. 0.15.0 30 Apr 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 0.14.0...0.15.0

    Open source →
    Release notes
    • Records::encode/Records::decode no longer has unneeded trait bounds.
    • ByteBuf::try_get_* methods that already exist on Buf are removed in favor of the Buf method
    Open source →
  6. 0.14.1 04 Feb 2025
    Release notes

    What's Changed

    • Explicitly use trait impl in types (branch V0.14) by @rukai in #109
    • Release V0.14.1 by @rukai in #110

    Full Changelog: 0.14.0...0.14.1

    Open source →
  7. 0.14.0 08 Dec 2024
    Release notes

    What's Changed

    • [Breaking change] Fix calling Records::encode / Records::decode with None by @rukai in #100
    • [Breaking change] remove "Key" suffix from ApiKey variants by @rukai in #97
    • VersionRange additions by @rukai in #99
    • ApiKey additions by @rukai in #98
    • Release 0.14 by @rukai in #101

    Full Changelog: 0.13.0...0.14.0

    Open source →
    Release notes
    • Records::encode/Records::decode is now reverted back to their original API, instead encode_with_custom_compression and decode_with_custom_compression is provided for custom compression.
    • ApiKey variants are renamed to remove the Key suffix.
    • Add iterate_all and valid_versions methods to ApiKey
    • Implement PartialEq and Display for VersionRange
    Open source →
  8. 0.13.0 15 Oct 2024
    Release notes

    What's Changed

    • Make ApiKey non_exhaustive by @rukai in #76
    • Update to kafka 3.8 by @rukai in #75
    • Make Debug impl for newtypes passthrough to inner type by @rukai in #77
    • Cleanup generate messages by @rukai in #82
    • user provided compression/decompression for record batches by @pdeva in #81
    • Cache CI builds by @rukai in #87
    • make record compression into default features by @rukai in #86
    • Update edition to 2021 by @rukai in #91
    • update pinned rust + fix clippy lints by @rukai in #92
    • Reduce allocations when decoding maps by @rukai in #94
    • Replace indexmap with vec by @rukai in #90
    • Improve error handling on encode version violation by @rukai in #96
    • Release 0.13 by @rukai in #95

    Full Changelog: 0.12.0...0.13.0

    Open source →
    Release notes
    • All "map" types in the protocol that were previously of type IndexMap<K, V> are now of type Vec<V>, the value of K is stored as a field within V.
      • This was done to resolve https://github.com/tychedelia/kafka-protocol-rs/issues/84 and improve decoding speed.
      • If you were previously calling .get() on the map, the best way to migrate is to refactor your code to avoid the need to lookup by iterating over the items in the response instead.
      • Alternatively, you could replace responses.get(name) with something like responses.iter().find(|x| x.name == name) to achieve the same result. But note that this access is now O(N) instead of O(1).
      • Alternatively, you could use an intermediate hashmap before converting to a Vec to retain the O(1) lookup.
    • Update protocol to kafka 3.8.0
    • The Debug impl for new type wrappers now passes directly to the inner type. The full list of new type wrappers is BrokerId, GroupId, ProducerId, TopicName and TransactionalId. For example GroupId was previously GroupId("some group") but is now "some group".
    • ApiKey is now non_exhaustive.
    • Added gzip, zstd, snappy and lz4 features to enable the different compression algorithms for records (All enabled by default)
    Open source →
  9. 0.12.0 04 Sep 2024
    Release notes

    What's Changed

    • Add helper methods to RequestKind and ResponseKind by @rukai in #70
    • Client/Broker cargo features by @rukai in #71
    • Rename messages_enum -> messages_enums by @rukai in #72
    • Release 0.12.0 by @rukai in #73

    Full Changelog: 0.11.0...0.12.0

    Open source →
    Release notes
    • Add client feature to enable encoding of requests and decoding of responses (enabled by default)
    • Add broker feature to enable encoding of responses and decoding of requests (enabled by default)
    • Add messages_enums feature to enable ResponseKind and RequestKind enums
    • Add encode, decode and header_version methods to ResponseKind and RequestKind
    Open source →
  10. 0.11.0 30 Jul 2024
    Release notes

    What's Changed

    • [Breaking change] RequestKind/ResponseKind - Avoid redundant variant names by @rukai in #61
    • Add basic integration test by @rukai in #63
    • Add Display and more From<T> implementations for StrBytes by @Hackzzila in #64
    • use CRC-32 ISO/HDLC instead of CRC-32 CKSUM by @Hackzzila in #62
    • Add integration tests to produce and fetch messages by @Hackzzila in #65
    • Use IntoIterator instead of Iterator for RecordBatchEncoder::encode by @Hackzzila in #67
    • Remove panic from RecordBatchEncoder::encode by @Hackzzila in #68
    • Remove EncodeError/DecodeError aliases by @Hackzzila in #69
    • WIP: Replace builder to improve ergonomics by @Hackzzila in #66

    Full Changelog: 0.10.2...0.11.0

    Open source →
    Release notes
    • Replace derive_builder with custom impl.
    • Remove EncodeError/DecodeError aliases
    • Remove panic from RecordBatchEncoder::encode
    • Use IntoIterator instead of Iterator for RecordBatchEncoder::encode
    • Use CRC-32 ISO/HDLC instead of CRC-32 CKSUM.
    • Add Display and more From<T> implementations for StrBytes.
    • Avoid redundant variant names in RequestKind/ResponseKind.
    Open source →
  11. 0.10.2 16 Jul 2024
    Release notes
    • Implement From<T> for RequestKind and ResponseKind.
    Open source →
  12. 0.10.1 01 Jul 2024
    Release notes
    • Fix lz4 compression.
    Open source →
  13. 0.10.0 05 Mar 2024
    Release notes
    • Use anyhow for public error types. In general, these errors reflect non-recoverable programmer error and should not occur when interacting with a well-formed Kafka implementation.
    • Rename StrBytes::from_str to from_static_str to avoid overlap with the FromStr trait.
    • Improve codegen, including filtering out unstable messages, improving ordering of structs in generated code, and other misc improvements.
    • Upgrade message version to upstream v3.7.0 Kafka.
    Open source →
  14. 0.9.0 26 Feb 2024
    Release notes
    • Remove the string crate.
    • Update derive-builder.
    Open source →
  15. 0.8.2 15 Jan 2024
    Release notes
    • Expose protocol::buf::gap module.
    Open source →
  16. 0.8.1 08 Jan 2024
    Release notes
    • Re-export indexmap as part of the public api.
    Open source →
  17. 0.8.0 07 Jan 2024
    Release notes
    • Implement Zstd and Lz4 compression.
    Open source →
  18. 0.7.0 16 Sep 2023
    Release notes
    • Switch to crc32c crate, providing hardware acceleration for crc operations on supported platforms.
    • Formatting fixes.
    • Miscellaneous dependency updates.
    • Fix issue with derive_builder implementation in which default fields were not being used correctly.
    Open source →
  19. 0.6.1 26 Jul 2023
    Release notes
    • Miscellaneous dependency updates.
    Open source →
  20. 0.6.0 01 Mar 2023
    Release notes
    • Add ApiKey::request_header_version and ApiKey::response_header_version to assist deserializing headers without reference to message type.
    Open source →
  21. 0.5.1 23 Feb 2023
    Release notes

    Bump uuid crate version.

    Open source →
  22. 0.5.0 08 Feb 2023
    Release notes
    • Clarify versioning support for upstream Kafka, tracking the latest Kafka stable release. Improve docs.

    Enhancements

    • Builder::builder trait for retrieving builder instances from messages without requiring extra builder imports.
    • #[non_exhaustive] added to all items to ensure forward compatability with protocol upgrades.
    Open source →
  23. 0.4.0 26 Nov 2022
    Release notes
    • Add utilities for dealing with response error codes.
    Open source →
  24. 0.3.0 19 Apr 2022
    Release notes

    Enhancements

    • Build messages from crate root.
    • Upgrade to latest version of Kafka protocol.
    Open source →
  25. 0.2.0 02 Mar 2022
    Release notes

    Enhancements

    • Add derive builder for all messages.
    Open source →
  26. 0.1.0 14 Dec 2021
    Release notes

    Initial release.

    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive