Skip to content
CAI
Software that uses CAICheck a score

pma/amqp

68.9

Adequate · 3 October 2026

2.6k

lines of production code

Elixir

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an Elixir library that provides a robust interface for interacting with RabbitMQ, supporting both version 3 and 4. It manages the lifecycle of AMQP connections and channels through supervised processes that handle automatic reconnection, while offering standardized helpers for consuming messages via direct or selective patterns. The library also exposes explicit type definitions for AMQP arguments and includes comprehensive test coverage for its core publishing, consuming, and connection management features.

Features

Add Application supervision and restructured consumer handling

The library now includes an AMQP.Application module that automatically starts and supervises configured AMQP connections and channels at startup, allowing users to access them via AMQP.Application.get\_connection/1 and get\_channel/1. Additionally, the library introduces AMQP.ConsumerHelper to standardize message composition and re-implements AMQP.SelectiveConsumer and AMQP.DirectConsumer in Elixir, replacing the previous Erlang-based consumer implementations to provide better integration and error handling for message consumption.

lib/amqp · high confidence

Introduces managed AMQP connection and channel processes with automatic reconnection

The library now provides \AMQP.Application.Connection\ and \AMQP.Application.Channel\ GenServers that manage the lifecycle of AMQP connections and channels. These processes automatically handle reconnection attempts when the underlying AMQP link drops, retrying at a configurable interval (defaulting to 5 seconds). Users can start these managed processes via \start\_link/1\ and retrieve the current connection or channel state using \get\_connection/1\ and \get\_channel/1\, which safely handle timeouts and missing resources. This shifts the responsibility of connection stability from the application code to the library's application layer.

lib/amqp/application · high confidence

Behavioural changes

AMQP type definitions added and Message module removed

The library now exposes AMQP argument type definitions (\argument\_type/0\ and \arguments/0\) in the main \AMQP\ module, providing users with explicit type information for AMQP arguments. Additionally, the internal \AMQP.Message\ struct has been removed, and the \Confirm\ module is now automatically aliased when using the \AMQP\ macro.

lib · high confidence

Updated README to reflect v4.1 API and RabbitMQ 4 support

The documentation has been updated to target the current library version (\~\> 4.1) and explicitly state support for RabbitMQ 3 and 4. The usage examples now demonstrate the modern Elixir syntax (e.g., function call parentheses, keyword list arguments) and the new event-based consumer pattern using \handle\_info\ callbacks for \:basic\_consume\_ok\, \:basic\_cancel\, and \:basic\_deliver\, replacing the previous \spawn\-based approach. Additionally, Docker Compose files are provided to help users spin up local RabbitMQ 3 and 4 instances for testing.

(repo-wide) · high confidence

Fixes

Enable transient non-exclusive queues in RabbitMQ 4 configuration

A new configuration file for RabbitMQ 4 has been added to explicitly permit transient non-exclusive queues by setting the \deprecated\_features.permit.transient\_nonexcl\_queues\ flag to true, addressing issues related to queue exclusivity behavior in this version.

config · high confidence

Test coverage

Added tests for Application-level AMQP connection and channel management; Expanded test coverage for AMQP client features and infrastructure.

Dependencies

Upgrade to AMQP 4.2.1 and modernize project configuration

The project has been upgraded to version 4.2.1, requiring Elixir 1.14 or later. The primary dependency, amqp\_client, has been updated from a specific Git tag (rabbitmq-3.3.4) to the Hex package version 4.2.1, which brings in updated rabbit\_common and related libraries like credentials\_obfuscation, ranch, and recon. The project configuration has also been modernized to include explicit package metadata, Dialyzer settings, ExDoc documentation generation, and ExCoveralls for test coverage, replacing the previous minimal setup.

(dependencies) · high confidence

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

How this codebase got here

Score

  • CAI 69 → 69 (-0.4)
  • Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 100 → 100 (+0.0)
  • Maturity 60 → 60 (+0.0)
  • Readiness 58 → 57 (-1.0)
  • Security 98 → 99 (+0.3)

Resolved (3)

  • Documentation: no architecture or design documentation (README.md)
  • Duplicated block (18 lines × 3) (lib/amqp/basic.ex)
  • Off-boarding risk: anonymized user #1

New (2)

  • Duplicated block (19 lines × 3) (lib/amqp/basic.ex)
  • Off-boarding risk: anonymized user #1

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

Survey your own repository

pma/amqp 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 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 6fa05e336e7db484850b5b4ab860029fc3858a78 — the exact code this score is about.
  • Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-8fe32cd45d00.