Confluent invested nearly three months deploying AI coding agents to port Apache Kafka's Java client to Rust. The effort revealed performance gaps that automated testing missed, prompted a complete restart partway through, and ultimately produced a workflow combining multiple agents that the company believes can maintain parity between Kafka and its non-Java client libraries as the platform develops.

Principal engineer and Apache Kafka committer Andrew Schofield detailed the project in a technical post released Tuesday. The initiative began with Anthropic's Claude Opus 4.6 and incorporated successive model iterations. Confluent has now released a generally available Rust client derived from Apache Kafka 4.4.0, along with a preview version of a new Python client.

A significant milestone came when the team applied 191 upstream Kafka commits—representing several months of development work—to the translated codebase in under two working days. Confluent intends to establish a continuous translation pipeline that will keep its non-Java clients aligned with future Kafka releases.

The challenge with Kafka's Java-only client

Apache Kafka offers only a Java client, yet Confluent Cloud processes nearly equivalent connection volumes from non-Java clients. Confluent's existing non-Java offerings depend on librdkafka, which handles threading and memory differently than the Java implementation.

With over 100 active Kafka contributors and typically more than 20 Kafka Improvement Proposals per release cycle, Confluent seeks to generate non-Java clients directly from Java source code via AI translation and achieve feature parity through a shared Rust foundation.

Three agents coordinate the translation

Two engineers each allocated roughly 75% of their effort to the experiment. Within fourteen days, they had a functional Rust producer lacking secure connections. TLS and authentication capabilities arrived by week four, with a basic consumer operational by week six.

The agents regularly sought engineer input on Kafka's design patterns. Partway through, the team abandoned its initial translation and began afresh using more detailed instructions.

Confluent's translation process uses three agents: a Project Manager that oversees coordination, an Actor that performs the translation, and a Critic that reviews the work. Engineers sign off on both milestone and phase plans and contribute to architectural choices, such as mapping Java threads to Tokio tasks.

The Actor and Critic exchange feedback through Git. The Actor commits translated code and responds to the Critic's observations until all concerns are resolved. Schofield notes that the review cycle typically requires approximately five iterations.

When tests pass but performance doesn't

The generated code passed the ported Kafka test suite, yet performance analysis uncovered a sleep call executing on each iteration of the networking loop.

Confluent then refined its translation instructions to articulate the intended behavior rather than depending solely on the original source and translated tests. Test passage alone proved insufficient for validating the quality of agent-produced code.

While agents handled translation, engineers collaborated with Rust specialists to construct interfaces that maintained Kafka compatibility without imposing Java patterns on Rust users. The team evaluated six interface designs to ensure the Rust core could manage timeouts without disrupting signal handling in other language runtimes.

Building a pipeline for ongoing synchronization

When Apache Kafka 4.4.0 released, the team chose to upgrade its existing Rust implementation rather than rebuild from scratch. Incorporating 191 upstream commits required less than two working days.

Confluent has not yet demonstrated whether it can sustain multiple client implementations in alignment as Kafka advances or quantified the engineering effort required. Schofield anticipates the continuous translation pipeline will commence this work in mid-2027.

The code is published under the Apache License 2.0. While Confluent participates in a wider trend of agent-driven Rust ports, its distinguishing objective is sustaining the translated code across successive Kafka releases.

Getting code quickly was only the beginning; making it useful across languages was the real engineering work.

Andrew Schofield