# `Kayrock.RecordBatch`
[🔗](https://github.com/kafkaex/kayrock/blob/main/lib/kayrock/record_batch.ex#L1)

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

# `t`

```elixir
@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()
}
```

# `deserialize`

```elixir
@spec deserialize(binary()) :: nil | Kayrock.MessageSet.t() | t()
```

Direct deserializer
Supplied for compatibility with the Request protocol

# `deserialize`

```elixir
@spec deserialize(integer(), binary()) :: nil | Kayrock.MessageSet.t() | t()
```

# `from_binary_list`

```elixir
@spec from_binary_list([binary()], atom()) :: t()
```

# `serialize`

```elixir
@spec serialize(t()) :: iodata()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
