View Source kpro_batch_v01 (kafka_protocol v4.2.0)

Summary

Functions

Decode one message or a compressed batch. NOTE: Messages are returned in reversed order, so it's cheaper for caller to concatenate (++) a short header to a long tail.

Types

-type batch() :: kpro:batch_input().
-type compress_option() :: kpro:compress_option().
-type key() :: kpro:key().
-type magic() :: kpro:magic().
-type message() :: kpro:message().
-type msg_ts() :: kpro:msg_ts().
-type offset() :: kpro:offset().
-type value() :: kpro:value().

Functions

-spec decode(offset(), binary()) -> [message()].
Decode one message or a compressed batch. NOTE: Messages are returned in reversed order, so it's cheaper for caller to concatenate (++) a short header to a long tail.
Link to this function

encode(Magic, Batch, Compression)

View Source
-spec encode(magic(), batch(), compress_option()) -> iodata().