Skip to content

Add produce response reader/writer and wire server reply#15

Merged
andreterroir merged 2 commits into
mainfrom
claude/produce-response-writer-reader-wxk79
Jun 9, 2026
Merged

Add produce response reader/writer and wire server reply#15
andreterroir merged 2 commits into
mainfrom
claude/produce-response-writer-reader-wxk79

Conversation

@andreterroir

Copy link
Copy Markdown
Owner

Implement the Produce response (v13, no tagged fields) and the response
header in protocol.zig. Unlike the streamed request, the response carries
only small metadata arrays, so it is modeled as a single nested data
structure read/written at once: the reader allocates into a caller-provided
allocator while the writer walks slices the caller holds.

The server now sends a placeholder success response after consuming a
produce request, and the client reads and prints it. Round-trip tests cover
each new reader/writer pair, mirroring the established approach.

https://claude.ai/code/session_016KgxNkzJurTPrykzXzKJ2z

claude added 2 commits June 4, 2026 07:42
Implement the Produce response (v13, no tagged fields) and the response
header in protocol.zig. Unlike the streamed request, the response carries
only small metadata arrays, so it is modeled as a single nested data
structure read/written at once: the reader allocates into a caller-provided
allocator while the writer walks slices the caller holds.

The server now sends a placeholder success response after consuming a
produce request, and the client reads and prints it. Round-trip tests cover
each new reader/writer pair, mirroring the established approach.

https://claude.ai/code/session_016KgxNkzJurTPrykzXzKJ2z
Collect the small request metadata (topic_ids and partition indices) while
streaming the request, and reflect it in the response instead of using
placeholder values. Record bytes are still drained a chunk at a time and
never held in memory; only the metadata needed for the response is kept,
in an arena freed once the response is written. The remaining per-partition
fields stay as example results a real broker would compute.

https://claude.ai/code/session_016KgxNkzJurTPrykzXzKJ2z
@andreterroir andreterroir merged commit 50b4fd8 into main Jun 9, 2026
1 check passed
@andreterroir andreterroir deleted the claude/produce-response-writer-reader-wxk79 branch June 9, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants