PHPackages                             goopil/rabbit-rs-native - 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. goopil/rabbit-rs-native

ActivePhp-ext

goopil/rabbit-rs-native
=======================

High-performance RabbitMQ transport for PHP and Laravel, powered by Rust

v0.0.2(today)00MITRustPHP ^8.4CI failing

Since Aug 17Pushed todayCompare

[ Source](https://github.com/Goopil/rabbit-rs)[ Packagist](https://packagist.org/packages/goopil/rabbit-rs-native)[ RSS](/packages/goopil-rabbit-rs-native/feed)WikiDiscussions main Synced today

READMEChangelog (2)DependenciesVersions (4)Used By (0)

Rabbit RS
=========

[](#rabbit-rs)

High-performance RabbitMQ transport for PHP and Laravel, powered by Rust.

[![CI](https://github.com/Goopil/rabbit-rs/actions/workflows/rust.yml/badge.svg)](https://github.com/Goopil/rabbit-rs/actions/workflows/rust.yml)[![PHP](https://github.com/Goopil/rabbit-rs/actions/workflows/php.yml/badge.svg)](https://github.com/Goopil/rabbit-rs/actions/workflows/php.yml)[![Integration](https://github.com/Goopil/rabbit-rs/actions/workflows/integration.yml/badge.svg)](https://github.com/Goopil/rabbit-rs/actions/workflows/integration.yml)[![License: MIT](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](https://opensource.org/licenses/MIT)

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

[](#quick-start)

**Step 1 — Install the native extension:**

```
pie install goopil/rabbit-rs-native
```

**Step 2 — Install the Laravel bridge:**

```
composer require goopil/rabbit-rs-laravel
```

**Step 3 — Publish the config:**

```
php artisan vendor:publish --tag="rabbit-rs-config"
```

**Step 4 — Publish and consume a job:**

```
// app/Jobs/ProcessOrder.php
class ProcessOrder implements ShouldQueue
{
    use Dispatchable, Queueable;

    public function __construct(public int $orderId) {}
}

// Dispatch
ProcessOrder::dispatch(42);
```

```
# Consume
php artisan queue:work --connection=rabbit-rs
```

What is Rabbit RS?
------------------

[](#what-is-rabbit-rs)

Rabbit RS is a native PHP extension written in Rust that provides a high-performance RabbitMQ transport for PHP and Laravel. It uses [Lapin](https://github.com/amqp-rs/lapin) (a Rust AMQP client) behind a testable transport abstraction, and delivers at-least-once semantics with publisher confirms and mandatory routing.

Key features:

- **At-least-once delivery** — publisher confirms and mandatory returns enabled by default
- **Multi-vhost consumption** — a single worker can consume from multiple brokers and vhosts
- **Weighted-fair scheduling** — deficit round-robin with starvation prevention
- **Deterministic recovery** — connection, channels, topology, QoS, then consumers
- **Connection-generation-aware tokens** — stale ACKs are rejected so RabbitMQ redelivers
- **Bounded replay buffer** — unconfirmed publications survive recovery in bounded memory
- **Octane lifecycle** — flush, reload, and stop hooks prevent channel leaks
- **No unsafe Rust** — `#![forbid(unsafe_code)]` across the entire workspace

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

[](#requirements)

- **PHP** 8.4 or 8.5
- **Laravel** 12 or 13 (for the Laravel bridge)
- **RabbitMQ** 4.3.x
- **Linux** x86\_64 or ARM64 (glibc or musl)
- **Rust** 1.96.0 (contributors only — see [Contributing](#contributing))

Distribution channels
---------------------

[](#distribution-channels)

Rabbit RS is distributed via two channels:

PackageChannelPurpose`goopil/rabbit-rs-native`[PIE](https://github.com/php/pie)Native PHP extension (binary)`goopil/rabbit-rs-laravel`[Packagist](https://packagist.org)Laravel queue driver (PHP source)PIE selects the correct pre-compiled binary for your PHP version, architecture, libc, and thread-safety mode. Composer installs the Laravel bridge and verifies that `ext-rabbit_rs` is loaded, but does **not** install or modify system PHP binaries.

**Not V1 distribution channels:**

- PECL
- Debian/RPM/APK packages
- Composer plugins that install binaries
- Full PHP images bundling the extension

These are explicitly out of scope for V1. Use PIE to install the extension in your Dockerfile — see [Installation](docs/installation.md).

Documentation
-------------

[](#documentation)

TopicFileInstallation[docs/installation.md](docs/installation.md)Distribution matrix[docs/distribution.md](docs/distribution.md)Configuration reference[docs/configuration.md](docs/configuration.md)Laravel usage[docs/laravel.md](docs/laravel.md)Topology management[docs/topology.md](docs/topology.md)Reliability and delivery[docs/reliability.md](docs/reliability.md)Operations[docs/operations.md](docs/operations.md)Octane integration[docs/octane.md](docs/octane.md)Troubleshooting[docs/troubleshooting.md](docs/troubleshooting.md)Contributing
------------

[](#contributing)

Rabbit RS is a monorepo. The Rust core and PHP extension live in `crates/`, and the Laravel bridge lives in `packages/laravel-queue/`.

### Build from source

[](#build-from-source)

```
# Build the extension in release mode
cargo build --release -p rabbit-rs-php

# Install into the current PHP
./scripts/install.sh --release

# Verify
php --ri rabbit_rs
```

### Run the quality gate

[](#run-the-quality-gate)

```
./scripts/check.sh
```

### Run tests

[](#run-tests)

```
# Rust tests
cargo test -p rabbit-rs-core

# PHP extension tests (requires the extension built and loaded)
./scripts/test-extension.sh

# Laravel package tests
cd packages/laravel-queue && vendor/bin/phpunit
```

### Generate stubs

[](#generate-stubs)

Stubs are maintained manually at `crates/rabbit-rs-php/stubs/rabbit_rs.stub.php`. To regenerate via `cargo php stubs`, you need a PHP build with the embed SAPI (`--enable-embed`).

```
./scripts/stubs.sh --stdout
```

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

20

↑

LowBetter than 12% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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

Every ~0 days

Total

2

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9719874?v=4)[Zachary V](/maintainers/goopil)[@Goopil](https://github.com/Goopil)

---

Top Contributors

[![Goopil](https://avatars.githubusercontent.com/u/9719874?v=4)](https://github.com/Goopil "Goopil (133 commits)")

### Embed Badge

![Health badge](/badges/goopil-rabbit-rs-native/health.svg)

```
[![Health](https://phpackages.com/badges/goopil-rabbit-rs-native/health.svg)](https://phpackages.com/packages/goopil-rabbit-rs-native)
```

PHPackages © 2026

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