Configure Kafka exactly-once semantics (EOS) for a transactional producer and idempotent pipeline

domain: kafka · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Enable idempotence on the producer: set enable.idempotence=true; this automatically sets acks=all, retries=Integer.MAX_VALUE, and max.in.flight.requests.per.connection=5
  2. Assign a stable transactional.id to the producer (unique per logical producer instance, e.g. 'payments-producer-0'); this enables cross-session exactly-once guarantees
  3. Initialize transactions in the producer application: producer.initTransactions() before sending any messages
  4. Wrap each logical unit of work: beginTransaction() → send() → sendOffsetsToTransaction() (when consuming) → commitTransaction() or abortTransaction() on error
  5. On the consumer side set isolation.level=read_committed so the consumer only reads messages from committed transactions and never sees aborted or in-flight transactional messages
  6. Configure the broker-side transaction.state.log.replication.factor and transaction.state.log.min.isr to at least 2 for the internal __transaction_state topic to survive broker failures

Known gotchas

Related routes

Configure Kafka exactly-once delivery using EOS v2 transactions for producer-to-consumer pipelines
kafka.apache.org · 6 steps · unrated
Implement Kafka exactly-once semantics using transactions
kafka.apache.org · 5 steps · unrated
Enable exactly-once source support on an existing Kafka Connect distributed cluster via the two-phase rollout
kafka.apache.org · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans