PHPackages                             marmol89/cauce - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. marmol89/cauce

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

marmol89/cauce
==============

Driver-agnostic queue monitoring and advanced retry strategies for Laravel.

v0.2.0(1mo ago)10MITPHPPHP ^8.2CI passing

Since Jun 5Pushed 1mo agoCompare

[ Source](https://github.com/marmol89/cauce)[ Packagist](https://packagist.org/packages/marmol89/cauce)[ RSS](/packages/marmol89-cauce/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (10)Versions (2)Used By (0)

   ![Cauce](https://raw.githubusercontent.com/marmol89/cauce/main/.github/cauce-logo.svg)

 [![Latest Version](https://camo.githubusercontent.com/a3259568dd3e77f25f69d37715a98abb7a932c0971e7621c3adcd985f28a07de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61726d6f6c38392f63617563653f6c6162656c3d72656c6561736526636f6c6f723d363336366631)](https://packagist.org/packages/marmol89/cauce) [![PHP Version](https://camo.githubusercontent.com/bec81fffb36e5b13b14590daf796722ad99bec66142c751da4fd86198a0128d6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d61726d6f6c38392f63617563653f636f6c6f723d313062393831)](https://packagist.org/packages/marmol89/cauce) [![Laravel](https://camo.githubusercontent.com/968b3c9a469b64c455be7caf04b21ef801d9797c65e4ac2885a89450621003bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31312532307c25323031322532307c25323031332d663433663565)](https://packagist.org/packages/marmol89/cauce) [![Tests](https://github.com/marmol89/cauce/actions/workflows/tests.yml/badge.svg)](https://github.com/marmol89/cauce/actions/workflows/tests.yml) [![License](https://camo.githubusercontent.com/a0f856e2d1a968162df6cf70161dbf8df21c66641f81bd5c75c17892e0f1bfd3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d61726d6f6c38392f63617563653f636f6c6f723d363336366631)](https://packagist.org/packages/marmol89/cauce) [![Downloads](https://camo.githubusercontent.com/94fa87550d2cfa73405456b84dcae3f6c66434a114638c29b5f4c29870b74cb0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61726d6f6c38392f63617563653f636f6c6f723d663539653062)](https://packagist.org/packages/marmol89/cauce)

> **Cauce** *(noun, Spanish)* — riverbed, channel, conduit.
>
> A driver-agnostic queue monitoring dashboard and advanced retry strategies for Laravel — no Redis required.

Why Cauce?
----------

[](#why-cauce)

Laravel Horizon is excellent but **locked to Redis**. If you use **database**, **SQS**, **Beanstalkd**, **RabbitMQ**, or any other queue driver, you're out of luck for observability.

Cauce gives you a **real-time dashboard** and **5 battle-tested retry strategies** that work with every Laravel queue driver. One `composer require`, zero driver restrictions.

---

Features
--------

[](#features)

### 🔭 Observability

[](#-observability)

- Live dashboard (Livewire 3 + Alpine + Tailwind)
- Real-time throughput, runtime &amp; success rate
- Per-connection and per-queue filtering
- Failed job browser with one-click retry
- CLI status overview (`cauce:status`)

### 🛡️ Resilience

[](#️-resilience)

- 5 retry strategies with configurable backoffs
- Circuit breaker with automatic state transitions
- Dead Letter Queue for exhausted jobs
- Payload redaction for sensitive fields
- Configurable alerting (log, mail, Slack, webhook)

### Retry Strategies

[](#retry-strategies)

StrategyDelay formulaBest for`LinearBackoff``base × attempt`Predictable, simple retries`ExponentialBackoff``base × 2^attempt`Most APIs (AWS-style backoff)`DecorrelatedJitter``random(base, min(cap, base × 2^attempt))`Thundering herd prevention`FibonacciBackoff``F(attempt) × base`Gradual, gentle growth`CircuitBreaker`*state machine*Unstable external services---

Requirements
------------

[](#requirements)

- **PHP** 8.2+
- **Laravel** 11.x / 12.x / 13.x
- **Database** — any Laravel-supported engine (MySQL, PostgreSQL, SQLite)

---

Installation
------------

[](#installation)

```
composer require marmol89/cauce
```

Then install assets and run migrations:

```
php artisan cauce:install
php artisan migrate
```

Optionally publish the config file:

```
php artisan vendor:publish --tag=cauce-config
```

The dashboard is now available at `/cauce`.

---

Quick start
-----------

[](#quick-start)

### 1. Track jobs (zero config)

[](#1-track-jobs-zero-config)

Cauce automatically tracks every job flowing through Laravel's queue — no code changes needed.

### 2. Apply a retry strategy

[](#2-apply-a-retry-strategy)

Use the `#[Retry]` PHP 8 attribute on any `ShouldQueue` job:

```
use Marmol89\Cauce\Attributes\Retry;
use Marmol89\Cauce\Retry\ExponentialBackoff;

#[Retry(strategy: ExponentialBackoff::class, max: 5, base: 2, cap: 300)]
class SendInvoiceEmail implements ShouldQueue
{
    public function handle(): void
    {
        // Job logic
    }
}
```

Or via Laravel queue middleware:

```
public function middleware(): array
{
    return [
        new \Marmol89\Cauce\Middleware\ApplyRetryStrategy(
            new \Marmol89\Cauce\Retry\ExponentialBackoff(base: 2, cap: 300, maxAttempts: 5)
        ),
    ];
}
```

### 3. Circuit breaker for external services

[](#3-circuit-breaker-for-external-services)

```
use Marmol89\Cauce\Attributes\Retry;
use Marmol89\Cauce\Retry\CircuitBreaker;

#[Retry(
    strategy: CircuitBreaker::class,
    threshold: 5,       // failures before opening
    cooldown: 60,       // seconds before half-open test
    key: 'payment-api'  // unique per service
)]
class ProcessPayment implements ShouldQueue
{
    // ...
}
```

The circuit breaker transitions through three states:

```
CLOSED ──(5 failures)──▶ OPEN ──(cooldown)──▶ HALF-OPEN
   ▲                                              │
   └────────────(success)─────────────────────────┘

```

---

Dashboard access control
------------------------

[](#dashboard-access-control)

By default, Cauce allows access in `local`, `testing`, `staging`, and `development`. In production, you control access via environment variables and a customizable Gate.

### Environment-based

[](#environment-based)

```
# .env
CAUCE_ALLOW_PRODUCTION=true
CAUCE_ALLOW_PRODUCTION_MUTATE=true
```

### Authentication requirement

[](#authentication-requirement)

```
CAUCE_REQUIRE_AUTH=true
```

When enabled, Cauce denies access to unauthenticated users even in development environments.

### Custom authorization

[](#custom-authorization)

Define a Gate in your `AppServiceProvider`:

```
use Illuminate\Support\Facades\Gate;

Gate::define('viewCauce', function ($user = null) {
    return $user !== null && $user->hasRole('admin');
});
```

Or use the `authorization_callback` config:

```
// config/cauce.php
'authorization_callback' => fn ($user) => $user->isAdmin(),
```

Add Laravel's `auth` middleware to `config/cauce.php` to require login:

```
'middleware' => [
    'web',
    'auth',
    \Marmol89\Cauce\Http\Middleware\Authorize::class,
    'throttle:60,1',
],
```

---

Configuration reference
-----------------------

[](#configuration-reference)

### Environment variables

[](#environment-variables)

VariableDefaultDescription`CAUCE_ENABLED``true`Global on/off switch`CAUCE_PATH``cauce`Dashboard URL path`CAUCE_ALLOW_PRODUCTION``false`Allow dashboard in production`CAUCE_ALLOW_PRODUCTION_MUTATE``false`Allow retry/delete in production`CAUCE_REQUIRE_AUTH``false`Require authenticated user`CAUCE_DB_CONNECTION``null`Dedicated DB connection`CAUCE_SAMPLE_RATE``1.0`Sampling 0.0–1.0`CAUCE_STORE_PAYLOAD``true`Store job payloads`CAUCE_PAYLOAD_MAX_SIZE``65535`Max payload bytes`CAUCE_RETENTION_COMPLETED_HOURS``24`Completed jobs retention`CAUCE_RETENTION_FAILED_DAYS``7`Failed jobs retention`CAUCE_RETENTION_METRICS_DAYS``30`Metrics retention`CAUCE_DEFAULT_RETRY_STRATEGY``null`Default retry class`CAUCE_GLOBAL_MAX_ATTEMPTS``null`Global max attempts`CAUCE_DEFAULT_CIRCUIT_THRESHOLD``5`Circuit breaker threshold`CAUCE_DEFAULT_CIRCUIT_COOLDOWN``60`Circuit breaker cooldown (s)`CAUCE_ALERTS_ENABLED``false`Alert system`CAUCE_ALERT_MAIL``null`Alert email`CAUCE_ALERT_SLACK_WEBHOOK``null`Slack webhook URL`CAUCE_ALERT_WEBHOOK``null`Generic webhook URL`CAUCE_DLQ_ENABLED``false`Dead Letter Queue`CAUCE_DLQ_QUEUE``dead-letter`DLQ queue name`CAUCE_LOG_CHANNEL``null`Dedicated log channel---

Commands
--------

[](#commands)

CommandDescription`cauce:install`Publish assets and run migrations`cauce:status`CLI overview of all queues and jobs`cauce:retry {id}`Re-queue a failed job by its Cauce ID`cauce:prune`Purge old records per retention config`cauce:clear`Wipe data. `--jobs`, `--metrics`, `--breakers`, `--all``cauce:dlq-replay`Replay jobs from the Dead Letter Queue`cauce:alert`Trigger alert evaluation manually### Scheduled pruning

[](#scheduled-pruning)

```
// routes/console.php
Schedule::command('cauce:prune')->daily();
```

---

API
---

[](#api)

Cauce exposes a REST API under `/cauce/api/v1` for programmatic access. The health endpoint at `/cauce/api/health` is unauthenticated for uptime monitoring.

MethodEndpointAuth`GET``/api/v1/status`Gate`GET``/api/v1/jobs`Gate`GET``/api/v1/jobs/{id}`Gate`POST``/api/v1/jobs/{id}/retry``mutateCauce``DELETE``/api/v1/jobs/{id}``mutateCauce``GET``/api/v1/failed`Gate`GET``/api/v1/metrics`Gate`GET``/api/health`None---

Testing
-------

[](#testing)

```
composer test        # Run the full suite
composer testdox     # Human-readable output
composer test-coverage  # With coverage report
```

Cauce has **124 tests** across 25 test classes covering unit and feature scenarios, with a CI matrix spanning PHP 8.2–8.4 × Laravel 11–13.

---

Security
--------

[](#security)

- Sensitive fields (`password`, `token`, `secret`, `key`, `authorization`, `credential`) are **automatically redacted** from stored payloads.
- Payload storage can be **disabled entirely** via `CAUCE_STORE_PAYLOAD=false`.
- Circuit breaker uses **atomic database operations** to prevent race conditions.
- Rate limiting is applied to all web (`60/min`) and API (`120/min`) routes.
- `roave/security-advisories` blocks installation of packages with known CVEs.

To report a vulnerability, open an issue on [GitHub](https://github.com/marmol89/cauce/issues).

---

License
-------

[](#license)

MIT © [marmol89](https://github.com/marmol89)

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

49d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/38738460?v=4)[marmol89](/maintainers/marmol89)[@marmol89](https://github.com/marmol89)

---

Top Contributors

[![marmol89](https://avatars.githubusercontent.com/u/38738460?v=4)](https://github.com/marmol89 "marmol89 (10 commits)")

---

Tags

laravelmonitoringqueueretrydashboardcircuit breakerbackoffmulti-driver

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/marmol89-cauce/health.svg)

```
[![Health](https://phpackages.com/badges/marmol89-cauce/health.svg)](https://phpackages.com/packages/marmol89-cauce)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M246](/packages/laravel-ai)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M136](/packages/laravel-pulse)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M133](/packages/roots-acorn)[spatie/laravel-health

Monitor the health of a Laravel application

87912.0M177](/packages/spatie-laravel-health)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1613.3k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
