Skip to content
CAI
Software that uses CAICheck a score

kafka4beam/brod

73.9

Strong · 13 November 2026

12.3k

lines of production code

Erlang

primary language

8

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 cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 73 → 74 (+1.1)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 77 → 77 (+0.0)
  • Architecture 100 → 100 (+0.0)
  • Maturity 66 → 67 (+0.8)
  • Readiness 70 → 74 (+4.2)
  • Security 94 → 90 (-4.0)
  • Event Sourcing 100 → 100 (+0.0)

Resolved (1)

  • Off-boarding risk: anonymized user #1

New (18)

  • Edited copies of one member (3 members, 14+ corresponding lines) (src/brod.erl)
  • Edited copies of one member (3 members, 8+ corresponding lines) (src/brod_client.erl)
  • Edited copies of one member (3 members, 8+ corresponding lines) (src/brod_utils.erl)
  • Edited copies of one member (3 members, 9+ corresponding lines) (src/brod_transaction.erl)
  • Edited copy of a member (10 corresponding lines) (src/brod_client.erl)
  • Edited copy of a member (12 corresponding lines) (src/brod_consumers_sup.erl)
  • Edited copy of a member (12 corresponding lines) (src/brod_consumers_sup.erl)
  • Edited copy of a member (18 corresponding lines) (src/brod_group_subscriber.erl)
  • Edited copy of a member (19 corresponding lines) (src/brod_consumers_sup.erl)
  • Edited copy of a member (2 corresponding lines) (src/brod_group_subscriber_worker.erl)
  • Edited copy of a member (25 corresponding lines) (src/brod_group_subscriber.erl)
  • Edited copy of a member (3 corresponding lines) (src/brod_group_coordinator.erl)
  • Edited copy of a member (30 corresponding lines) (src/brod_group_subscriber.erl)
  • Edited copy of a member (4 corresponding lines) (src/brod_consumers_sup.erl)
  • Edited copy of a member (5 corresponding lines) (src/brod_utils.erl)
  • Edited copy of a member (7 corresponding lines) (src/brod_group_coordinator.erl)
  • Edited copy of a member (7 corresponding lines) (src/brod_group_subscriber_v2.erl)
  • Off-boarding risk: anonymized user #1

Written by cca.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 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit d3e467b6cbcf1c751be2634760a6819757c315fe — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.61+preprod-b8b1a43ae4c3.