booblik
Wiki

booblik-conformance

Generated page

Model gemma-mtp, commit ef58254ca7be, 2026-08-16, sources: 2. Edit the code or the hand-written documentation instead.

Diagram

The conformance client contract

This module serves as the reference implementation of the conformance client contract, acting as a fixture for the harness to ensure the protocol is correctly implemented Main.kt:14-19. It is designed to prove that the harness works by providing a "green" baseline where every check in the harness passes before any other client is tested Main.kt:18-19.

More: The conformance client contract

Command-line verbs

The operational modes available via the command line are:

VerbDescription
metadataRetrieves topic metadata including partition offsets Main.kt:60
produceProduces a list of records to a specific partition Main.kt:64
produce-keyedPartitions a payload based on a key using Fnv1a before producing Main.kt:68
fetchFetches records from a partition up to a specific byte limit Main.kt:72

More: Command-line verbs

Produce and AckPolicy

The interaction between produce requests and the response lifecycle is governed by the AckPolicy Main.kt:116-121:

AckPolicyBehavior
noneNo response is expected; the client returns immediately Main.kt:124-126
writtenClient waits for and reads the produce response Main.kt:160
forcedClient waits for and reads the produce response Main.kt:160

Partitioner.Fnv1a

For keyed production, the client uses Partitioner.Fnv1a to select a partition Main.kt:158. This selection is made by mapping the key against the list of partitions obtained from the broker's metadata Main.kt:154-157.

Fetch truncation and maxBytes

When performing a fetch, the client handles cases where the response might be incomplete Main.kt:182. If the records list is empty but the truncated flag is set, it indicates that the next record in the log is larger than the maxBytes requested, resulting in a recordExceedsMaxBytes report Main.kt:182-184.

Key files

FileLinesWhat is there
booblik-conformance/build.gradle.kts18-20Dependency declaration for :booblik-client
…/conformance/Main.kt37-88Main entry point and command-line argument parsing
…/conformance/Main.kt90-106Metadata retrieval logic
…/conformance/Main.kt108-132Standard produce logic
…/conformance/Main.kt143-166Keyed produce logic using Fnv1a
…/conformance/Main.kt168-189Fetch logic and truncation handling

Behaviour that surprises

  • When using AckPolicy.NONE, the BooblikClient.sendProduce function returns null, and the client must return immediately without reading to avoid blocking forever Main.kt:124-126.
  • A fetch response that contains an empty list of records but has the truncated flag set is not a sign of having caught up to the head, but rather an indication that the next record exceeds maxBytes Main.kt:182-184.

On this page