softwaremill/kmq
58.2
Adequate · 6 November 2026
1.4k
lines of production code
Java
with Scala
4
measurements over time
What this system is
This system is a Kafka Message Queue (KMQ) library that manages message consumption, processing, and redelivery using a marker-based tracking mechanism. It provides a functional, Cats Effect-based architecture for handling message timeouts, automatic retries, and dead-letter queue routing. The library includes configuration options for redelivery dispatchers and maximum retry counts, along with example applications in Java and Scala to demonstrate its usage.
Features
Added standalone Scala example application
A new standalone example application has been added to demonstrate the KMQ library's functionality. It includes a reactive client that consumes messages from a Kafka topic, sends start and end markers for redelivery tracking, and conditionally drops messages to simulate processing failures. The example also provides a sender component that generates test messages and a tracker component to manage redelivery, all configured to run against a local Kafka instance.
example-scala/src/main/scala · high confidence
Added standalone example application for KMQ
Introduced a new standalone example application consisting of four Java classes: StandaloneConfig, StandaloneSender, StandaloneProcessor, and StandaloneRedeliveryTracker. This example demonstrates how to configure and use the KMQ library for message queue operations, including sending messages, processing them with a custom processor, and tracking redeliveries. The configuration includes setting up Kafka clients and KMQ-specific parameters like queue name, marker topic, and timeout duration.
example-java/src/main/java/com/softwaremill/kmq/example/standalone · high confidence
New embedded Kafka example with redelivery tracking
The embedded example now includes a new \EmbeddedExample\ class that demonstrates an iterative-style client using an embedded Kafka instance. This example features a \RedeliveryTracker\ for handling message redelivery and includes an \UncaughtExceptionHandling\ utility to log uncaught exceptions in threads, providing a more robust demonstration of the KMQ library's capabilities in a local environment.
example-java/src/main/java/com/softwaremill/kmq/example/embedded · high confidence
New redelivery mechanism with dead-letter queue support
The system now includes a dedicated redelivery subsystem that tracks message processing via markers and automatically redelivers messages that exceed their configured retry window. If a message exceeds the maximum redelivery count, it is sent to a configurable dead-letter topic instead of being discarded. This implementation replaces the previous Kafka Streams-based approach with a custom actor-based model (using Cats Effect) that manages marker consumption, offset committing, and redelivery scheduling, ensuring redelivery resumes correctly after queue state recovery.
repository · high confidence
Removals
Removal of embedded Kafka demo and redelivery logic
The standalone demo application (App.java) and the associated redelivery tracking components (RedeliveryProcessor, RedeliveryTracker) have been removed from the main source code. This eliminates the embedded Kafka setup, message sending/processing loops, and the Kafka Streams-based mechanism that tracked message processing markers to handle timeouts and redelivery.
src/main · high confidence
Behavioural changes
New dedicated dispatcher for redeliverers
A new configuration entry \kmq.redeliver-dispatcher\ has been added to the reference configuration, defining a dedicated thread-pool-executor for redeliverers. This change allows redelivery operations to be isolated on their own thread pool, potentially improving performance and resource management for message redelivery tasks.
core/src/main/resources · medium confidence
Redelivery subsystem refactored to use Cats Effect
The redelivery mechanism in the core module has been reimplemented to replace the previous Akka-based actors with a Cats Effect-based architecture. This change introduces new components in the redelivery package, including \KafkaClientsResourceHelpers\ for managing Kafka producer and consumer resources, \RedeliveryActors\ for starting the redelivery process, and a \package.scala\ defining core type aliases. The implementation now relies on \cats.effect.IO\ and \Resource\ for resource safety, marking a shift from the prior actor model to a functional effect system.
core/src/main/scala · high confidence
Redesigned message redelivery using Kafka markers and timestamps
The core message queue implementation has been refactored to replace the previous Kafka Streams-based redelivery mechanism with a marker-based approach using dedicated marker topics. The new \KmqClient\ coordinates message processing by sending 'start' markers when polling messages and 'end' markers upon successful processing, allowing the \RedeliveryTracker\ to monitor progress. Redelivery decisions are now driven by Kafka message timestamps rather than processing timestamps, and the system supports configurable dead-letter topics and maximum redelivery counts via \KmqConfig\. Additionally, \KafkaClients\ has been moved to the core module and updated to support global extra configuration parameters.
core/src/main/java · high confidence
Test coverage
Added tests for message redelivery and dead-letter queue behavior
Added integration and unit tests in core/src/test to verify the redelivery mechanism, including sending undelivered messages to a dead-letter queue, respecting maximum redelivery counts, and properly sorting markers in the queue.
core/src/test · high confidence
Dependencies
Initial build configuration with Kafka and Cats Effect dependencies
The project now uses an SBT build definition (build.sbt) that establishes the core library dependencies, including Apache Kafka clients (version 3.4.0), Cats Effect (3.4.9), fs2 (3.6.1), and log4cats (2.6.0). It also configures test dependencies such as embedded-kafka, scalatest (3.2.15), and logback-classic (1.4.7), while setting up project structure for core, example-java, and example-scala modules targeting Scala 2.13.
(dependencies) · high confidence
Housekeeping
Initial project setup and documentation
The repository has been initialized with the Apache 2.0 license, a .gitignore file, and comprehensive README documentation explaining the Kafka Message Queue (kmq) library, its architecture, and usage. Configuration files for Scala Steward, Scalafmt, and Mergify have been added to support automated dependency updates, code formatting, and CI/CD workflows.
(repo-wide) · 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 59 → 58 (-1.2)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 62 → 62 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 52 → 52 (+0.0)
- Readiness 62 → 60 (-1.4)
- Security 73 → 61 (-11.3)
- Performance 100 → 100 (+0.0)
Resolved (10)
- Outdated: ch.qos.logback:logback-classic
- Outdated: co.fs2:fs2-core_2.13
- Outdated: com.typesafe.akka:akka-stream-kafka_2.13
- Outdated: com.typesafe.scala-logging:scala-logging_2.13
- Outdated: io.github.embeddedkafka:embedded-kafka_2.13
- Outdated: org.apache.kafka:kafka-clients
- Outdated: org.apache.kafka:kafka_2.13
- Outdated: org.typelevel:cats-effect_2.13
- Outdated: org.typelevel:log4cats-core_2.13
- Outdated: org.typelevel:log4cats-slf4j_2.13
New (1)
- Dependency hygiene PARTLY measured — sbt declarations read, dependency currency not (Maven Central unreachable)
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
softwaremill/kmq 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 5339d8f9fce6ea6187d148ea355e9e29a10b2d20 — 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.