You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(produce): honour the acks option and make acks=0 fire-and-forget work (#593)
Since the 1.0 rewrite every produce went out at acks: -1: the option was read
under a name the request builder never used. Resolve :acks / :required_acks once
to the wire (:acks canonical, :required_acks a deprecated alias until 2.0),
reject values the int16 encoder cannot carry with {:error, :invalid_acks}, and
accept :all / :any as -1.
acks: 0 now takes a dedicated fire-and-forget path (sent async, never retried,
returns base_offset: nil). A failed async send closes the socket, and the client
gains {:tcp_error} / {:ssl_error} clauses plus a catch-all handle_info/2 so an
unmatched message no longer crashes it together with every broker socket.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: lib/kafka_ex/api.ex
+11-2Lines changed: 11 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -810,8 +810,17 @@ defmodule KafkaEx.API do
810
810
* `messages` - List of message maps with `:value`, optional `:key`, `:timestamp`, `:headers`
811
811
* `opts` - Options including:
812
812
* `:api_version` - API version to use. If omitted, resolved via `:api_versions` app-config or broker-negotiated max (`min(broker_max, kayrock_max)`). See CHANGELOG § 3-tier API version resolution.
813
-
* `:required_acks` - Number of acks required (default: 1)
0 commit comments