All notable changes to ankusa_kafka will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
0.7.0 - 2026-10-28
Added
Ankusa.Sink.Kafkaimplementsmax_message_bytes/1from:max_record_bytes(DEL-5): an inline record whose base64 value would pass it is produced as a claim instead of being refused, and a body that is over it by itself is{:permanent, {:message_too_large, size, max}}without a broker call. Requires anankusarelease with themax_message_bytessink callback; publish core first.Ankusa.Intake.Kafka: the intake log ofwal.type: dual(DUR-1.b.b, ADR 0002). Every acked hook is also a record in a replicated Kafka topic before the201. A brod client of its own (:"ankusa_kafka.<instance>.intake", never the sink's) produces withrequired_acks: -1,partition_onwire_limit: 1,max_retries: 0and an explicit partition, the node's stamped one (phash2(node_id) rem partition_count, never recomputed, so growing the topic never remaps a node).verify/1reads DescribeConfigs and metadata at boot and refuses a topic with a replication factor under 3,min.insync.replicasunder 2,unclean.leader.election.enable, aretention.msunder twicebackup.max_age_ms, or amax.message.bytesunderintake.max_record_bytes. Broker error codes map to the four error classes. Replay filters by node id and skips unknown kinds and versions. NeedsankusawithAnkusa.Intake. A three-broker KRaft cluster joins the package'sdocker-compose.yml(the Redpanda service stays for the sink's tests);bench/partition_bench.exsmeasures what one partition carries.Sink.Kafka: withordered: true(core, ADR 0004) the record key is the lane's key and the record carries anankusa_ordering_keyheader.
Changed
- Requires
ankusa ~> 0.7(Ankusa.Sink.Messaging,Ankusa.Sink.Connections,Ankusa.Intake); publish core first. Ankusa.Sink.Kafkais built on core'sAnkusa.Sink.MessagingandAnkusa.Sink.Connections. Records are unchanged;:brokersalso takes one comma-separated"host:port,host:port"string, and an entry without a port raisesArgumentErrorinstead ofMatchError.
0.6.0 - 2026-10-14
Added
:max_record_bytes(default1_000_000): a record whose value plus key is larger is refused before it is produced, as{:error, {:permanent, _}}.:idle_timeout_ms(default600_000,0never, at least:produce_timeout_msplus 1 s): a brod client with no delivery for that long is stopped (Ankusa.Sink.Reaper, requires core's) and the next delivery starts a new one.- Every record carries the
ankusa_idempotency_keyheader: the same tenant-scoped key as the message'sidempotency_key(Ankusa.Envelope.idempotency_key/1), always present. Requiresankusa0.5 or newer: the key comes fromAnkusa.Envelope.idempotency_key/1, which 0.4.x does not have, so the Hex requirement is now~> 0.5. ankusa_dedupe_keyandankusa_replay_idrecord headers when present.
Changed
- A broker
message_too_large,invalid_messageorinvalid_recordis{:error, {:permanent, reason}}: dead-lettered at once instead of retried for the whole retry policy. Requiresankusa ~> 0.6(sink error classes); publish core first.
Fixed
- A
:saslpassword is held in a closure (brod_utils:init_sasl_opt/1, asbrod_supdoes before it starts a client), so neither brod's client state nor its crash report, for example when no broker answers, prints it.
0.4.0 - 2026-10-02
Added
Ankusa.Sink.KafkaimplementsAnkusa.Sink.describe/2, advertising its brokers, topic, and record key to the AsyncAPI document the admin API serves. Credentials (:sasl) are never part of it.
Changed
- The Hex requirement on
ankusais~> 0.4(was~> 0.2):describe/2needsAnkusa.Sink.Description, which core has from 0.4.0.
Removed
- The sink no longer implements the removed Ankusa.Sink.ordering_key/2 callback:
deliveries are unordered. The record key still decides the partition, so
Kafka's own per-partition ordering is unchanged. Requires the matching
ankusacore.
0.3.0 - 2026-10-01
No code changes. Released as 0.3.0 in step with ankusa 0.3.0 and the other packages in this release.
0.2.1 - 2026-09-28
Added
- A
sha256field on a claim-checked message: the lowercase hex digest of the payload, for the reader to verify the bytes it redeems against. It used to live inside the claim ref.
Changed
- The message
claimfield isurn:ankusa:claim:v1:<tenant>:<claim_id>: a tenant and a canonical (uppercase) ULID, where it used to carry the pack id, byte offset/length, and digest. The messagevstays1. Both come fromAnkusa.Sink.Messageinankusa0.2.1.
0.2.0 - 2026-09-27
Added
- Ankusa.Sink.ordering_key/2, implemented by this sink as the record key, which is exactly the partition (and so the ordering) scope. Dispatch now serializes deliveries sharing a key and runs different keys concurrently. "Per-key ordering" is stated to the pipeline instead of assumed.
Changed
- The message
claimfield is now a claim-check ref URN string instead of a nested ticket object, breaking for consumers; the messagevstays1. :inline_max_bytesdefaults to 64 KiB (was 8 KiB), read fromAnkusa.Sink.Message.inline_max_bytes/1.- Depends on
ankusa~> 0.2: core 0.1 has neitherAnkusa.Sink.Message.inline_max_bytes/1nor Ankusa.Sink.ordering_key/2.
0.1.0 - 2026-09-23
Added
- Initial release:
Ankusa.Sink.Kafkaadapter - Message format v1 (shared with
ankusa_rabbitmq) - Claim Check integration for payloads >
inline_max_bytes - Per-key ordering via configurable record key
- Synchronous produce with
acks=all - Kafka headers:
ankusa_id,ankusa_source_id,ankusa_tenant_id,ankusa_message_version,content_type