Cargo Features

[dependencies]
kafka-protocol = { version = "0.14.0", default-features = false, features = ["messages_enums", "client", "broker", "gzip", "zstd", "snappy", "lz4"] }
messages_enums

adds the ResponseKind + RequestKind enums with variants for every message type.
disabled by default since it doubles clean release build times due to lots of generated code.

Affects messages::RequestKind, messages::ResponseKind

client default

Enable this feature if you are implementing a kafka client.
It will enable encoding of requests and decoding of responses.

broker default

Enable this feature if you are implementing a kafka protocol compatible broker.
It will enable encoding of responses and decoding of requests.

gzip default

Enable compression of records using gzip

Enables flate2

zstd default

Enable compression of records using zstd

Enables zstd

snappy default

Enable compression of records using snap

Enables snap

lz4 default

Enable compression of records using lz4

Enables lz4

default = broker, client, gzip, lz4, snappy, zstd

These default features are set whenever kafka-protocol is added without default-features = false somewhere in the dependency tree.