booblik

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:

ArgumentAckPolicyBehavior
noneAckPolicy.NONENo response is expected; the client returns immediately Main.kt:117
writtenAckPolicy.WRITTENClient waits for a response Main.kt:118
forcedAckPolicy.FORCEDClient 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

FileLinesWhat is there
…/conformance/Main.kt37-88The main entry point and verb dispatching logic
…/conformance/Main.kt108-132The produce verb implementation
…/conformance/Main.kt143-166The produceKeyed verb implementation
…/conformance/Main.kt168-189The fetch verb implementation

Behaviour that surprise

  • BooblikClient.sendProduce returns null when AckPolicy.NONE is used, which is a signal that no response should be read from the socket BooblikClient.kt:48.
  • A fetch request at the high watermark is not an error; it returns an empty list of records and the current high watermark ServerTest.kt:97-100.
  • produce-keyed requires the client to perform a metadata request first because the broker does not receive the key to perform partitioning itself Main.kt:136-150.

On this page