Skip to content
CAI
Software that uses CAICheck a score

kafka4beam/brod

75.3

Strong · 23 September 2026

12.2k

lines of production code

Erlang

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Brod is an Erlang library that provides client functionality for interacting with Apache Kafka clusters, supporting both producer and consumer operations. It enables users to publish and consume messages, manage topics, and handle consumer groups across various Kafka versions. The system includes comprehensive telemetry for monitoring activity and offers example projects for integration with Elixir applications.

Features

Add Elixir example code for Brod usage

This change introduces a new Elixir example project under contrib/examples/elixir that demonstrates how to configure and use the Brod library directly. The included sample code covers key operations: creating and deleting Kafka topics, publishing messages synchronously and asynchronously, and consuming messages using both the legacy group subscriber API and the newer v2 group subscriber behavior.

contrib/examples/elixir · high confidence

Add Elixir usage example for brod

A new Elixir example project has been added to the contrib/examples/elixir directory, providing a complete tutorial on configuring and using the brod library directly in Elixir. This includes a README with step-by-step instructions for setting up dependencies, configuring Kafka clients, publishing messages with partition keys, and consuming messages using group\_subscriber\_v2. The example also ships with necessary configuration files (config.exs, dev.exs), a docker-compose.yaml for running Kafka and Kafdrop locally, and basic test setup.

contrib · high confidence

Add telemetry metrics and pin kafka\_protocol dependency

Brod now emits telemetry events, starting with \\[brod, produce\_request\_sent\]\, allowing users to monitor producer activity via the \telemetry\ library. This change adds a dependency on \telemetry\ and introduces the \brod\_metrics\ module for documentation. Additionally, the \kafka\_protocol\ dependency is pinned to version 4.3.6 to ensure stability.

(repo-wide) · high confidence

Initial release of public and internal header definitions

This change introduces the core Erlang header files for the brod library, establishing the public API surface and internal implementation details. The new include/brod.hrl file defines the public records and types used by consumers and producers, including kafka\_message\_set, kafka\_fetch\_error, brod\_produce\_reply, and consumer group metadata, along with constants like BROD\_DEFAULT\_TIMEOUT. The include/brod\_int.hrl file provides internal macros, logging wrappers using the standard Logger API, SASL options, and version checks for Kafka 0.9/0.10 compatibility. These headers form the foundational type definitions and constants required for the library's client, producer, and consumer components.

include · high confidence

New test environment setup scripts and Docker configurations

Added a suite of scripts to automate the local test environment, including a setup script that provisions Kafka clusters (supporting versions 0.9 through 4.0) using either Zookeeper or KRaft modes via Docker Compose. The update introduces environment variable definitions for network configuration, Docker Compose files for both legacy Zookeeper-based and modern KRaft-based Kafka deployments, a .gitignore for SSL artifacts, and an Erlang script to analyze and print code coverage gaps from test runs.

scripts · high confidence

Architecture

Refactor client and consumer supervision into dedicated modules

The library restructures its internal supervision hierarchy by introducing \brod\_client\ as the central process managing broker connections and per-topic/partition workers, and \brod\_consumers\_sup\ to handle the dynamic supervision of consumer processes. This change decouples the client connection logic from the broader \brod\ application module, providing a clearer separation of concerns for connection management and consumer lifecycle.

src · high confidence

Test coverage

New test suites and demo applications for Brod

Added comprehensive Common Test suites and demo applications to the test directory. The new test suites cover client operations (including SSL, SASL, and connection restarts), topic and consumer group coordination, compression algorithms (gzip, snappy, lz4, zstd), and consumer behaviors (transactional message filtering, offset management, and connectivity checks). Additionally, demo applications were added to illustrate topic subscriber usage, consumer group subscriber patterns with Kafka offset commits, and local offset commit strategies.

test · high confidence

Dependencies

Add Elixir example project with dependency specifications

A new Elixir example project has been added to the contrib/examples directory, providing a standalone tutorial for using the brod library directly. The project specifies dependencies on brod version 3.10.0 and jason version 1.2.1, along with their locked transitive dependencies in mix.lock, allowing users to see a concrete configuration for integrating these libraries.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 66 → 75 (+8.9)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 87 → 94 (+6.7)
  • Architecture 100 → 100 (-0.0)
  • Maturity 65 → 66 (+0.8)
  • Readiness 59 → 70 (+11.5)
  • Security 68 → 96 (+28.5)
  • Event Sourcing 100 → 100 (+0.0)

Resolved (25)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • No exposed public API
  • Off-boarding risk: anonymized user #1
  • Test reliability not included
  • The test dir README only states the TLS/SSL files live here and that they are copied from Kafka docker image; it does not explain how to run tests or what SSL configurations are exercised. (test/data/ssl/README.md)
  • TooManyMethods: brod (src/brod.erl)
  • TooManyMethods: brod_client (src/brod_client.erl)
  • …and 5 more

New (36)

  • Coverage not measured — no coverage collector is wired up
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (12 lines × 2) (src/brod_group_subscriber.erl)
  • Duplicated block (13 lines × 2) (src/brod_group_subscriber.erl)
  • Duplicated block (20–21 lines × 2) (src/brod_group_subscriber.erl)
  • Duplicated block (5 lines × 2) (src/brod_supervisor3.erl)
  • Duplicated block (7 lines × 2) (src/brod_group_subscriber.erl)
  • Duplicated block (7 lines × 3) (src/brod_cg_commits.erl)
  • Duplicated block (8 lines × 2) (src/brod_group_subscriber_worker.erl)
  • Duplicated block (8 lines × 2) (src/brod_supervisor3.erl)
  • Further sole-owners (lower concentration)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 16 more

Changes since last survey

  • 7 commits — 7 feature/other, 0 fixes

By area

  • (root) — 7 commits

Notable commits

  • change: Add full support for static membership (with heartbeat) (#669)
  • change: Depend on telemetry and emit produce request event (#671)
  • change: Enable newer OffsetCommit request versions (#672)
  • change: Handle offset commits during a connection-down window (#670)
  • change: Make static-member fencing configurable (#674)
  • change: Pin kafka_protocol-4.3.6 (#673)
  • change: docs: fix changelog

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

kafka4beam/brod was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 2a415b270cc8e172f01e643201a513ce8f159a88 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.