Command-line verbs
Generated page
Model gemma-mtp, commit ef58254ca7be, 2026-08-16, sources: 6. Edit the code or the hand-written documentation instead.
Diagram
The capabilities verb
The handshake mechanism where the client declares its roles (producer, consumer) and name. The client must respond with roles= and name= to allow the harness to determine which checks to run Main.kt:43-46.
The metadata verb
Retrieving topic information, including partition IDs, log start offsets, and high watermarks. The client iterates through the topics and partitions returned by the broker to print partition=<id> <start_offset> <high_watermark> Main.kt:98-104.
The produce verb and AckPolicy
Mechanics of sending records and the behavior of AckPolicy.NONE (silent requests) versus WRITTEN and FORCED. The ack argument is mapped to an AckPolicy as follows:
| Argument | AckPolicy | Behavior |
|---|---|---|
none | AckPolicy.NONE | No response is expected; the client returns immediately Main.kt:117 |
written | AckPolicy.WRITTEN | Client waits for a response Main.kt:118 |
forced | AckPolicy.FORCED | Client waits for a response Main.kt:119 |
The produce-keyed verb and Partitioner.Fnv1a
How the client-side partitioner selects a partition based on a key before the broker sees the data. The client first fetches metadata to find available partitions and then uses Partitioner.Fnv1a.partitionFor to select the target partition Main.kt:158.
The fetch verb and maxBytes truncation
Retrieving records, handling the high watermark, and the edge case where a record exceeds maxBytes resulting in a truncated tail. If a response contains no complete records but the truncated flag is set, the client reports the truncatedRecordBytes Main.kt:182-184.
Exit codes and ErrorCode reporting
Distinguishing between client-side failures (non-zero exit) and broker-side refusals (exit zero with error=CODE). A broker refusal is considered a valid result and is reported via error=CODE on stdout Main.kt:84-85, whereas a client-side exception results in a non-zero exit code Main.kt:86.
Key files
| File | Lines | What is there |
|---|---|---|
…/conformance/Main.kt | 37-88 | The main entry point and verb dispatching logic |
…/conformance/Main.kt | 108-132 | The produce verb implementation |
…/conformance/Main.kt | 143-166 | The produceKeyed verb implementation |
…/conformance/Main.kt | 168-189 | The fetch verb implementation |
Behaviour that surprise
BooblikClient.sendProducereturnsnullwhenAckPolicy.NONEis used, which is a signal that no response should be read from the socketBooblikClient.kt:48.- A
fetchrequest at the high watermark is not an error; it returns an empty list of records and the current high watermarkServerTest.kt:97-100. produce-keyedrequires the client to perform ametadatarequest first because the broker does not receive the key to perform partitioning itselfMain.kt:136-150.