Configure Kafka exactly-once delivery using EOS v2 transactions for producer-to-consumer pipelines

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

Steps

  1. Set the producer's transactional.id to a stable, unique string per logical producer instance; this enables idempotent delivery and transaction coordination.
  2. Call initTransactions() once at startup, then wrap each batch of sends in beginTransaction() / commitTransaction(), using abortTransaction() in the catch block on failure.
  3. On the consumer side, set isolation.level=read_committed so that transactional messages are only visible after the producer commits; aborted transaction records are filtered out.
  4. With EOS v2 (Kafka 2.5+), the transaction coordinator epoch mechanism prevents zombie producers from committing stale transactions; ensure all broker versions support EOS v2 (epoch fencing).
  5. For Kafka Streams or Kafka Connect sink connectors, set processing.guarantee=exactly_once_v2 (Streams) or the sink connector's exactly-once flag to enable the framework-level transaction management.
  6. Monitor for incomplete transactions via consumer lag on the __transaction_state internal topic and alert on aborted transaction rates.

Known gotchas

Related routes

Configure Kafka exactly-once semantics (EOS) for a transactional producer and idempotent pipeline
kafka · 6 steps · unrated
Configure Kafka Streams exactly-once processing with processing.guarantee=exactly_once_v2
kafka.apache.org · 6 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