View Source KafkaEx.Client.RequestBudget (kafka_ex v1.1.0)
Outer GenServer.call budget for a client request, derived from its per-attempt
Socket.recv deadline. Pure (config is passed in) so it stays testable in
isolation — the budget the capturing-mock API tests can't observe.
Summary
Functions
per_attempt * attempts + buffer, where attempts is the client retry count
(or 1, the default, for a send-once request).
Functions
@spec call_budget(pos_integer(), pos_integer()) :: pos_integer()
per_attempt * attempts + buffer, where attempts is the client retry count
(or 1, the default, for a send-once request).
The product is a safe upper bound, not a wall-clock guarantee: a socket timeout
is send-once, so the client rarely consumes more than one per_attempt.