View Source Kayrock.RecordBatch (kayrock v0.2.0)

Represents a batch of records (also called a record set)

This is the newer format in Kafka 0.11+

See https://kafka.apache.org/documentation/#recordbatch

Summary

Types

@type t() :: %Kayrock.RecordBatch{
  attributes: term(),
  base_sequence: term(),
  batch_length: term(),
  batch_offset: term(),
  crc: term(),
  first_timestamp: term(),
  last_offset_delta: term(),
  max_timestamp: term(),
  partition_leader_epoch: term(),
  producer_epoch: term(),
  producer_id: term(),
  records: term()
}

Functions

Link to this function

deserialize(record_batch_data)

View Source
@spec deserialize(binary()) :: nil | Kayrock.MessageSet.t() | t()

Direct deserializer Supplied for compatibility with the Request protocol

Link to this function

deserialize(msg_set_size, msg_set_data)

View Source
@spec deserialize(integer(), binary()) :: nil | Kayrock.MessageSet.t() | t()
Link to this function

from_binary_list(messages, compression \\ :none)

View Source
@spec from_binary_list([binary()], atom()) :: t()
@spec serialize(t()) :: iodata()