Skip to content
CAI
Software that uses CAICheck a score

fastify/fastify-kafka

44.1

Weak · 8 November 2026

356

lines of production code

JavaScript

with TypeScript

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add TypeScript definitions for @platformatic/kafka integration

The package now includes TypeScript declaration files that extend Fastify to support Kafka producers and consumers. Users can access \app.kafka\ with typed methods for pushing messages, consuming data, and subscribing to topics, along with configuration options for producer and consumer settings.

types · high confidence

Add basic Kafka producer/consumer example

A new example file (examples/basic.js) demonstrates how to set up a Fastify application with both a Kafka producer and consumer. It shows registering the plugin with bootstrap brokers, subscribing to topics, handling incoming messages, and pushing responses back to Kafka.

examples · high confidence

Behavioural changes

Migration to @platformatic/kafka and Fastify 5 support

The plugin has migrated from the underlying \node-rdkafka\ library to \@platformatic/kafka\ (starting in version 3.x) and now officially supports Fastify 5.x. This change introduces new configuration options such as \producerTopicConf\, \consumerTopicConf\, and \metadataOptions\, and updates the API to use \bootstrapBrokers\ instead of the legacy \metadata.broker.list\. The package name has also been updated to \@fastify/kafka\.

(repo-wide) · high confidence

Migration to @platformatic/kafka for producer and consumer implementations

The library's core messaging components have been rewritten to use the @platformatic/kafka package. The new consumer supports both batch consumption (collecting a specified number of messages with a timeout) and continuous streaming, allowing users to register callbacks for specific topics and manually commit offsets. The producer has been updated to use string serializers by default and sends messages via a unified send API that handles topic, key, payload, and partition details. Both components now expose standard Node.js EventEmitter interfaces for error handling and lifecycle management.

lib · high confidence

Test coverage

Added tests for Kafka consumer and producer using Node test runner

Added new test files for the Kafka Consumer and Producer components, migrating the test suite to use the Node test runner (\node:test\). The tests cover message emission, stream destruction, initialization errors, batch consumption, commit errors, and handler exceptions for the consumer, as well as message sending, broker errors, constructor errors, and shutdown handling for the producer. Test utilities were also updated to use the \@platformatic/kafka\ Admin API for topic management.

test · high confidence

Dependencies

Update dependencies for @fastify/kafka v4.0.0

The package.json has been updated to version 4.0.0, introducing several dependency changes. The Kafka client library has been switched from node-rdkafka to @platformatic/kafka (v1.34.0). The Fastify plugin wrapper has been upgraded to fastify-plugin v6.0.0, and the core Fastify dependency is now set to v5.0.0. Development dependencies have also been updated, including c8 to v12.0.0, neostandard to v0.13.0, and @types/node to v26.0.0, while the TypeScript testing tool has shifted from tsd to tstyche (v7.0.0).

(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 45 → 44 (-0.5)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 54 → 54 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 43 → 43 (+0.0)
  • Readiness 49 → 49 (+0.0)
  • Security 37 → 36 (-1.1)
  • Performance 100 → 100 (+0.0)

Resolved (3)

  • Documentation: no architecture or design documentation
  • Scanner failed to run — not a clean result
  • Scanner failed to run — not a clean result

Changes since last survey

  • 1 commits — 1 feature/other, 0 fixes

By area

  • .github/workflows — 1 commit

Notable commits

  • change: chore: bump fastify/workflows/.github/workflows/reusable-release.yml

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

Survey your own repository

fastify/fastify-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 8 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 f999cc8ad4b40742bc23a4f0c182cd4676ed4f42 — 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-45ab2cab63de.