# `Pulsar.Reader.Callback`
[🔗](https://github.com/efcasado/pulsar-elixir/blob/main/lib/pulsar/reader/callback.ex#L1)

Internal callback module for Pulsar.Reader.

Implements the `Pulsar.Consumer.Callback` behaviour, forwarding messages to the reader's
stream process, and hosts the flow policy that reports what each delivery cost.

# `became_active`

# `became_passive`

# `handle_call`

# `handle_cast`

# `handle_info`

# `handle_invalid_message`

# `reached_end_of_topic`

# `report_permits`

```elixir
@spec report_permits(map(), pid(), reference()) :: :ok
```

Flow policy for a reader's consumer, configured as
`{Pulsar.Reader.Callback, :report_permits, [stream_pid, reader_ref]}`.

Reports rather than grants: the stream process refills as it consumes, which is what keeps
the broker from sending further ahead than the stream has read.

# `terminate`

---

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