Skip to content
CAI
Software that uses CAICheck a score

profunktor/fs2-rabbit

62.0

Adequate · 7 November 2026

5.8k

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

Added ScalaCheck generators for AMQP model types in testkit

The testkit module now includes a new \package.scala\ file that provides implicit \Arbitrary\ and \Cogen\ instances for the library's AMQP model types, such as \AmqpEnvelope\, \AmqpProperties\, \DeliveryTag\, \ExchangeName\, \RoutingKey\, \QueueName\, \ConsumerTag\, and various \AmqpFieldValue\ subtypes. This enables users to easily generate random test data for these types when writing property-based tests using ScalaCheck.

testkit · high confidence

Added resilient stream execution with exponential backoff

A new \ResilientStream\ object has been introduced in the \dev.profunktor.fs2rabbit.resiliency\ package to provide automatic error recovery for effectful \fs2.Stream\ programs. When a stream fails, it is automatically restarted after a delay that increases exponentially based on the retry count (defaulting to 5 seconds for the first retry, then scaling by the square of the attempt number). This allows users to run long-lived streams with built-in resilience against transient failures, while fatal errors are logged and re-raised to stop the stream.

core/src/main/scala/dev/profunktor/fs2rabbit/resiliency · high confidence

Initial release of the Fs2Rabbit library

Introduces the first version of the Fs2Rabbit library, providing a streaming API for interacting with RabbitMQ. This release includes core components for creating connections and channels, declaring exchanges and queues, and handling message consumption and publishing via Fs2 streams. It also provides a demo application and configuration utilities to help users get started with the library.

src/main · high confidence

New Circe-based JSON encoder and decoder for AMQP messages

The json-circe module now provides stream-based JSON transformation capabilities using the Circe library. Users can encode case class payloads into JSON strings via Fs2JsonEncoder and decode JSON payloads from AMQP envelopes into case classes via Fs2JsonDecoder, both exposing their functionality as fs2.Pipe transformations for integration into streaming pipelines.

json-circe/src/main · high confidence

Project initialization and repository scaffolding

The repository has been initialized with standard project infrastructure, including a Code of Conduct, Contribution guidelines, and an Apache 2.0 License. The README now documents the library's dependencies (fs2-rabbit, fs2-rabbit-circe), supported Scala versions (2.13, 3.x), and usage instructions. Development tooling is established via a \.scalafmt.conf\ (version 3.11.5), a \.git-blame-ignore-revs\ file for formatting commits, and a \.mergify.yml\ configuration to automatically merge Scala Steward PRs. Local testing is supported by a \docker-compose.yml\ for RabbitMQ and Nix flake definitions (\flake.nix\, \flake.lock\) for the development shell. The \.gitignore\ has been updated to target Scala/IDE artifacts.

(repo-wide) · high confidence

Behavioural changes

1 commit (0 fixes) modifying otel4s

A change to existing behaviour in otel4s — 1 commit, 16 files: “Add a fs2-rabbit-otel4s module for tracing (\#1198)” (refs \#1198).

otel4s · medium confidence · unverified

AMQP argument type safety and conversion implementation

The library now enforces AMQP protocol compliance for message arguments by introducing a \SafeArg\ type and a \SafeArgument\ type class. This ensures that only supported types (such as String, Boolean, numeric types, Date, List, and Map) can be passed as arguments, preventing runtime errors from unsupported custom classes. The implementation includes implicit conversions to Java maps and specific instances for handling type conversions required by the AMQP protocol.

core/src/main/scala/dev/profunktor/fs2rabbit · high confidence

Added Scala 3 Java conversion compatibility layer

A new \javaConversion\ object has been introduced in the Scala 3 source directory to provide binary compatibility for Java interop. This object extends \AsJavaExtensions\ and \AsScalaExtensions\ from the standard library, replacing the previous reliance on the \collectionCompat\ library for \.asJava\ instances, ensuring seamless conversion between Scala and Java collections in the Scala 3 build.

core/src/main/scala-3 · high confidence

Algebra layer refactored into granular, composable traits

The core algebra in \core/src/main/scala/dev/profunktor/fs2rabbit/algebra\ has been restructured from a monolithic interface into distinct, focused traits—\Connection\, \Declaration\, \Binding\, \Consume\, \Publishing\, \AckConsuming\, \Acking\, \Deletion\, \Cancel\, \Publish\, and \InternalQueue\—each with its own implementation object (e.g., \ConnectionResource.make\, \Consume.make\) and \mapK\-capable ops wrappers. This change exposes lower-level AMQP operations (such as explicit \basicReject\, \basicNack\, and \addPublishingListener\) and internal queue management, allowing users to compose only the capabilities they need rather than depending on a single all-encompassing client interface.

core/src/main/scala/dev/profunktor/fs2rabbit/algebra · high confidence

Introduces type-safe AMQP model and header encoding/decoding

The library now provides a comprehensive, type-safe model for AMQP entities in the \dev.profunktor.fs2rabbit.model\ package. This includes new case classes for \AmqpEnvelope\, \AmqpMessage\, \AmqpProperties\, and \Headers\, replacing previous ad-hoc representations. A key addition is the \Headers\ type, which uses a sealed \AmqpFieldValue\ hierarchy (supporting strings, numbers, timestamps, tables, etc.) and implicit \AmqpFieldEncoder\/\AmqpFieldDecoder\ instances to safely encode and decode header values. This change also introduces value types for exchanges, queues, and routing keys, along with codec support for converting between these models and the underlying RabbitMQ Java client types.

core/src/main/scala/dev/profunktor/fs2rabbit/model · high confidence

Java collection conversion compatibility shim added

A new \javaConversion\ object has been introduced in the Scala 2.13-specific source directory to provide \AsJavaExtensions\ and \AsScalaExtensions\. This addition supports the \collectionCompat\ library usage for \.asJava\ instances, ensuring binary compatibility while maintaining the ability to convert between Scala and Java collection types.

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

New configuration and declaration models for RabbitMQ resources

This change introduces new case classes and builder patterns in the config package to manage RabbitMQ connection settings and resource declarations. Fs2RabbitConfig now includes explicit fields for requeueOnReject, requestedHeartbeat, automaticTopologyRecovery, and clientProvidedConnectionName, allowing users to fine-tune connection behavior and recovery. Additionally, declaration.scala provides structured builders (DeclarationQueueConfig, DeclarationExchangeConfig) with dedicated methods for setting durability, exclusivity, auto-deletion, and queue types (Classic, Quorum, Stream), while deletion.scala offers configurable strategies for removing queues and exchanges based on usage and emptiness states.

core/src/main/scala/dev/profunktor/fs2rabbit/config · high confidence

New effects abstractions for envelope decoding, logging, and stream evaluation

The \core/src/main/scala/dev/profunktor/fs2rabbit/effects\ package introduces new typeclasses and utilities to decouple AMQP operations from specific effect types. \EnvelopeDecoder\ provides a unified way to extract properties, headers, and payloads from AMQP envelopes, including new typed header decoders (\headerAs\, \optHeaderAs\) and deprecating older string/int/long-specific methods. \BoolValue\ adds a typeclass for checking boolean configuration flags (e.g., durable, exclusive), while \Log\ and \StreamEval\ provide abstract interfaces for logging and stream evaluation backed by \cats.effect.Sync\. These changes allow users to compose AMQP interactions more flexibly within their own effect systems.

core/src/main/scala/dev/profunktor/fs2rabbit/effects · high confidence

RabbitClient refactored to use a Builder pattern with configurable execution context and thread factory

The RabbitClient construction in the interpreter module has been replaced with a Builder pattern, allowing users to explicitly configure the underlying execution context and thread factory via \withExecutionContext\ and \withThreadFactory\ methods. This change introduces a new \LiveInternalQueue\ implementation for internal message buffering and adds \RabbitClientOps\ to support effect-type transformation via \imapK\ and error handling via \liftAttemptK\. The previous overloaded connection and client creation methods have been removed in favor of this single, configurable builder approach.

core/src/main/scala/dev/profunktor/fs2rabbit/interpreter · high confidence

Refactored RabbitMQ program logic into dedicated modules with imapK support

The core program logic in the \program\ package has been reorganized into distinct modules: \AckConsumingProgram\, \AckingProgram\, \ConsumingProgram\, and \PublishingProgram\. This refactoring separates concerns for acknowledgment handling, consumption, and publishing, while introducing \imapK\ operations on the program interfaces to allow easier transformation between effect types (e.g., from \IO\ to \Task\). Users benefit from a cleaner internal structure that supports more flexible effect system integration without changing the external API surface.

core/src/main/scala/dev/profunktor/fs2rabbit/program · high confidence

Updated RabbitMQ test configuration for connection handling

The RabbitMQ test environment configuration has been updated to include specific settings for connection management and consumer behavior. The new advanced.config file sets the channel tick interval to 500ms and clears loopback users, while the rabbitmq.conf file defines a consumer timeout of 1000ms. These changes support the termination of streams when the server closes the connection.

rabbit-test-config · medium confidence

Updated example demos to use new client builder and connection configuration

The example demos in \examples/src/main/scala\ have been updated to reflect the new client creation API. The \RabbitClient\ is now instantiated using a builder pattern (e.g., \RabbitClient.default(config).resource\), and the configuration object \Fs2RabbitConfig\ now uses \clientProvidedConnectionName\ instead of the previous \clientProvidedName\. Additionally, the \DropwizardMetricsDemo\ demonstrates the new optional \MetricsCollector\ integration, and the \RPCDemo\ and \AckerConsumerDemo\ showcase the updated channel and consumer creation flows.

examples/src/main/scala · high confidence

Test coverage

Added BaseSpec test trait; Added integration and resiliency tests for Fs2Rabbit; Added property-based tests for AMQP model types; Added property-based tests for model type class laws; Added test coverage for AMQP model types and codecs; Added tests for EnvelopeDecoder; Added tests for JSON encoding and decoding; Added unit tests for AMQP field values, properties, and declaration configurations.

Dependencies

Simplified build configuration and updated dependencies

The build system has been refactored to consolidate dependency management into a new \project/Dependencies.scala\ file, replacing the previous scattered version definitions. This change updates core library versions, including Cats Effect to 3.7.1, fs2 to 3.14.0, Circe to 0.14.16, and the RabbitMQ client to 5.36.0. Additionally, the SBT build tool itself has been upgraded from version 0.13.8 to 1.13.0, and several SBT plugins (such as sbt-microsites, sbt-mdoc, and sbt-scoverage) have been updated to their latest versions.

project · high confidence

Upgrade to Scala 3 and multi-module build structure

The project has upgraded its primary Scala version to 3.3.8 while maintaining cross-compilation support for Scala 2.13.18. The build has been restructured into a multi-module architecture, separating the core library, JSON/Circe integration, test kit, examples, and microsite into distinct sub-projects. This change also updates the organization to 'dev.profunktor' and configures the build to use a centralized dependency management file (Dependencies.scala) for libraries such as fs2, cats-effect, and amqp-client.

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

Lenses

  • Code Health 76 → 76 (+0.0)
  • Architecture 91 → 91 (+0.2)
  • Maturity 37 → 50 (+13.0)
  • Readiness 61 → 61 (+0.2)
  • Security 86 → 81 (-5.5)
  • Performance 90 → 100 (+9.7)

Resolved (6)

  • Off-boarding risk: anonymized user #1
  • Outdated: dev.zio:zio-interop-cats_3
  • Outdated: dev.zio:zio_3
  • Outdated: io.dropwizard.metrics:metrics-core
  • Outdated: io.dropwizard.metrics:metrics-jmx
  • Outdated: io.monix:monix_3

New (30)

  • Concentrated knowledge decay
  • Dependency hygiene PARTLY measured — sbt declarations read, dependency currency not (Maven Central unreachable)
  • Duplicated block (5 lines × 2) (otel4s/src/main/scala/dev/profunktor/fs2rabbit/otel4s/internal/Semconv.scala)
  • Off-boarding risk: anonymized user #1
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/algebra/Binding.scala)
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/algebra/BindingOps.scala)
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/algebra/Connection.scala)
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/algebra/Consume.scala)
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/algebra/Declaration.scala)
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/algebra/Deletion.scala)
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/algebra/Publish.scala)
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/arguments.scala)
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/config/Fs2RabbitConfig.scala)
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/config/declaration.scala)
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/effects/EnvelopeDecoder.scala)
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/interpreter/RabbitClient.scala)
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/model/AmqpEnvelope.scala)
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/model/AmqpFieldValue.scala)
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/model/AmqpProperties.scala)
  • Orphaned file (core/src/main/scala/dev/profunktor/fs2rabbit/model/Headers.scala)
  • …and 10 more

Changes since last survey

  • 5 commits — 5 feature/other, 0 fixes

By area

  • (root) — 1 commit
  • otel4s/src — 1 commit
  • project/Dependencies.scala — 1 commit
  • project/build.properties — 1 commit
  • project/plugins.sbt — 1 commit

Notable commits

  • change: Add a fs2-rabbit-otel4s module for tracing (#1198)
  • change: Update logback-classic to 1.6.6
  • change: Update sbt, scripted-plugin to 1.13.1
  • change: Update sbt-updates to 0.7.1
  • change: Update scala3-library to 3.3.9

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

Survey your own repository

profunktor/fs2-rabbit 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 7 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 fb3ef71c63bc0c3698b92f128c8537db11b82c6f — 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-5f8314471808.