Skip to content
CAI
Software that uses CAICheck a score

typelevel/fs2-kafka

57.0

Adequate · 6 November 2026

8.2k

lines of production code

Scala

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add KafkaCredentialStore for PEM-based SSL configuration

Users can now create a KafkaCredentialStore from PEM-encoded strings for CA certificates, client private keys, and client certificates. This new API simplifies SSL setup by automatically configuring the necessary Kafka properties (security.protocol, ssl.truststore.type, ssl.keystore.type, etc.) with PEM format, handling newline replacement internally.

modules/core/src/main/scala/fs2/kafka/security · high confidence

Add Scala 2.12 compatibility layer for Kafka converters

A new compatibility file is introduced in the Scala 2.12 source directory to support Java/Scala interop. This file provides a wrapper for \scala.collection.JavaConverters\ and defines helper methods for converting Scala Options to Java Optionals and wrapping arrays, ensuring the core Kafka functionality works correctly on Scala 2.12.

modules/core/src/main/scala-2.12 · high confidence

Introduce MkAdminClient capability for AdminClient instantiation

A new \MkAdminClient\ trait has been added to the \fs2.kafka.admin\ package, providing a capability-based abstraction for creating the underlying Java \AdminClient\. This allows users to override the default instantiation logic (which uses \AdminClient.create\ with the provided settings) via implicit resolution, facilitating easier testing or custom client configuration within the \KafkaAdminClient\ infrastructure.

modules/core/src/main/scala/fs2/kafka/admin · high confidence

Removals

Removal of legacy fs2-kafka consumer and producer abstractions

The legacy \KafkaConsumer\, \KafkaProducer\, \ConsumerSettings\, \ProducerSettings\, and related message/offset types (\CommittableMessage\, \ProducerMessage\, \ProducerResult\) have been removed from the \src/main/scala/fs2/kafka\ package. This deletion eliminates the previous actor-based consumer implementation and the \produceWithBatching\ producer API, requiring users to migrate to the library's newer streaming interfaces (such as \KafkaConsumer\#partitionedStream\ and the updated \ProducerResult\ model) that are maintained in other parts of the codebase.

src/main/scala/fs2/kafka · high confidence

Behavioural changes

Add Scala 2.13+ Java interop converters

The library now includes a new internal \converters\ object in the \scala-2.13+\ source directory to handle conversions between Scala and Java collections, options, and durations using the \scala.jdk\ package, which is available in Scala 2.13 and later. This change enables the use of modern Scala collection interoperability features for users running on Scala 2.13+.

modules/core/src/main/scala-2.13+ · high confidence

Introduce MkProducer capability trait for producer instantiation

The library now exposes a \MkProducer\ trait that abstracts the creation of the underlying Java \KafkaProducer\. This allows users to override the default producer instantiation logic, which is particularly useful for testing scenarios where a mock or stub producer can be provided via an implicit instance instead of the default synchronous implementation.

modules/core/src/main/scala/fs2/kafka/producer · high confidence

New KafkaConsumerActor implementation with bounded parallelism and synchronous revoke commits

The internal Kafka consumer actor has been replaced with a new implementation that manages consumption via a request queue and bounded parallelism, grouping partitions into at most \maxParallel\ streams to control throughput. This change introduces synchronous offset commits on partition revoke when \commitOnRevoke\ is enabled, ensuring offsets are committed immediately during rebalances rather than asynchronously. The actor also handles subscription and assignment updates by aligning partition states and managing group semaphores to prevent backpressure issues.

modules/core/src/main/scala/fs2/kafka/internal/actor · high confidence

New configurable offset commit recovery and dedicated exception types

The library now provides a \CommitRecovery\ abstraction that allows users to define custom strategies for handling offset commit failures, with a default strategy that retries \RetriableCommitFailedException\ and \RebalanceInProgressException\ using jittered exponential backoff. This change introduces new exception classes—\CommitRecoveryException\, \CommitTimeoutException\, \ConsumerShutdownException\, \DeserializationException\, and \SerializationException\—to provide more specific error reporting for commit, shutdown, and serialization issues.

modules/core/src/main/scala/fs2/kafka · high confidence

Project migration to Typelevel organization and documentation overhaul

The project has moved to the Typelevel organization, updating the Maven coordinates from \com.ovoenergy\ to \org.typelevel\ and changing the artifact group. The README has been significantly simplified to serve as a landing page pointing to the new Typelevel microsite for full documentation, while the license file has been updated to remove the Apache License appendix and instead include the MIT license for derived code from the Embedded Kafka library. Additionally, the build configuration has been updated to use Scala Steward for dependency management with pinned versions for Kafka clients and Logback, and the code formatting rules in \.scalafmt.conf\ have been expanded to support Scala 3 source compatibility and stricter style enforcement.

(repo-wide) · high confidence

Refactored KafkaConsumer into a modular trait-based API

The KafkaConsumer implementation has been restructured from a single monolithic class into a set of focused capability traits (KafkaAssignment, KafkaCommit, KafkaConsume, KafkaConsumeChunk, KafkaConsumeGrouped, KafkaConsumerLifecycle, KafkaMetrics, KafkaOffsets, KafkaSubscription, and KafkaTopics). This modular design allows users to compose only the consumer capabilities they need, simplifies testing by enabling easier mocking of specific behaviors, and introduces new features such as chunk-based consumption with automatic offset management (KafkaConsumeChunk), grouped partition streams (KafkaConsumeGrouped), and explicit lifecycle control via terminate and awaitTermination (KafkaConsumerLifecycle).

modules/core/src/main/scala/fs2/kafka/consumer · high confidence

Refactored internal blocking and resource management for Kafka consumers and producers

The internal implementation for Kafka consumer and producer connections has been restructured to improve thread safety and performance. A new \Blocking\ abstraction was introduced to manage synchronous Kafka API calls, allowing users to optionally provide a custom \ExecutionContext\ via \ConsumerSettings\ and \ProducerSettings\ instead of relying on a default single-threaded executor. The \WithConsumer\ and \WithProducer\ components now utilize this abstraction to wrap blocking operations, and \WithConsumer\ exposes a \synchronouslyDuringRebalance\ method to handle offset commits safely during rebalances. Additionally, \WithAdminClient\ was updated to use cancelable futures for better resource management.

modules/core/src/main/scala/fs2/kafka/internal · high confidence

Removal of internal FiniteDuration conversion syntax

The internal \FiniteDurationSyntax\ helper, which provided an \asJava\ method to convert Scala \FiniteDuration\ values to Java \Duration\ objects, has been removed from the codebase. This change eliminates a specific internal utility class used for time unit conversions within the Kafka integration layer.

src/main/scala/fs2/kafka/internal · high confidence

Test coverage

Added comprehensive test suite for fs2-kafka core components; Added test infrastructure for Cats equality and suite base traits; Added tests for KafkaCredentialStore.fromPemStrings; Added tests for internal syntax and KafkaFuture cancellation.

Dependencies

Major dependency upgrades and Scala 3 support

The build has been upgraded to support Scala 3 (3.3.8) alongside Scala 2.12 (2.12.21) and 2.13 (2.13.18), with the base version set to 4.1. Core dependencies have been significantly updated: fs2-core to 3.14.0, cats-effect to 3.7.1, kafka-clients to 4.3.1, and vulcan to 1.14.0. Additionally, the project now uses munit 1.3.6 for testing, testcontainers-scala 0.44.1 for integration tests, and logback-classic 1.6.3. A new scalafix module was added to manage migration rules, and the website documentation infrastructure was updated to use Docusaurus 1.6.2.

(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

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 51 → 57 (+6.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 75 → 75 (-0.0)
  • Architecture 94 → 89 (-5.7)
  • Maturity 30 → 44 (+14.1)
  • Readiness 57 → 67 (+10.8)
  • Security 82 → 65 (-16.6)
  • Performance 82 → 67 (-14.7)

Resolved (12)

  • Further sole-owners (lower concentration)
  • High: security finding (details withheld)
  • No dependency advisory monitoring
  • Off-boarding risk: anonymized user #1
  • Orphaned file (modules/core/src/main/scala/fs2/kafka/consumer/KafkaConsumeChunk.scala)
  • Orphaned file (modules/vulcan-testkit-munit/src/main/scala/fs2/kafka/vulcan/testkit/SchemaSuite.scala)
  • Orphaned file (scalafix/rules/src/main/scala/fix/Fs2Kafka.scala)
  • Outdated: ch.qos.logback:logback-classic
  • Outdated: com.github.fd4s:fs2-kafka_2.13
  • Outdated: com.github.fd4s:vulcan_2.13
  • Outdated: org.apache.kafka:kafka-clients
  • Outdated: org.slf4j:slf4j-api

New (10)

  • Dependency hygiene PARTLY measured — sbt declarations read, dependency currency not (Maven Central unreachable)
  • 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)
  • Hotspot: modules/core/src/main/scala/fs2/kafka/KafkaConsumer.scala (modules/core/src/main/scala/fs2/kafka/KafkaConsumer.scala)
  • Off-boarding risk: anonymized user #1

Changes since last survey

  • 16 commits — 16 feature/other, 0 fixes

By area

  • (root) — 7 commits
  • modules/core — 5 commits
  • .github/profile-picture.png — 1 commit
  • .github/social-preview.png — 1 commit
  • modules/vulcan — 1 commit
  • website/static — 1 commit

Notable commits

  • change: Add GitHub profile picture
  • change: Add GitHub social preview image
  • change: Change to a single shared broker for tests (#1545)
  • change: Change to derive Parallel where possible (#1546)
  • change: Change to use new project logo (#1536)
  • change: Change to use sbt-typelevel-site (#1537)
  • change: Do not commit stale offsets on revoke (#1534)
  • change: Move fs2-kafka-vulcan modules to separate repository (#1548)
  • change: Update developers to reflect current maintainers
  • change: Update kafka-avro-serializer, ... to 8.4.0 (#1540)
  • change: Update kafka-clients to 4.3.2 (#1541)
  • change: Update kafka-clients to 4.4.0 (#1542)
  • change: Update logback-classic to 1.6.6 (#1538)
  • change: Update scala3-library to 3.3.9 (#1535)
  • change: Update scalafmt config and use scalafix to organize imports (#1544)
  • change: Update vulcan to 1.14.1 (#1539)

Architecture

  • Containers 0 added · 0 removed · contexts 0 added · 1 removed · edges 0 added · 0 removed

Removed bounded contexts (1)

  • repository

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

Survey your own repository

typelevel/fs2-kafka 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 6 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 6d328e17a6814c3480b60ec4a0f99d41197fde68 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — 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.3+preprod-60d1b390edf0.