PHPackages                             rocketslab/rabbitmq-actions - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. rocketslab/rabbitmq-actions

ActiveProject[Queues &amp; Workers](/categories/queues)

rocketslab/rabbitmq-actions
===========================

A wrapper for vladimir-yuldashev RabbitMQ Queue for Laravel with Actions

0.1.1(3y ago)35MITPHPPHP ^8.0

Since Jun 18Pushed 3y ago1 watchersCompare

[ Source](https://github.com/RocketsLab/rabbitmq-actions)[ Packagist](https://packagist.org/packages/rocketslab/rabbitmq-actions)[ RSS](/packages/rocketslab-rabbitmq-actions/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

RabbitMQ Actions
================

[](#rabbitmq-actions)

This package its a wrapper of vladimir-yuldashev/rabbitmq-queue-laravel.

Adds a new feature to produce and consume messages with RabbitMQ/AMQP protocol.

[Versão em PT-BR](README_PTBR.md)

### Install and Requirements

[](#install-and-requirements)

---

Requirements:

- PHP 8.0 +
- Laravel 8.0 +
- RabbitMQ driver for Laravel Queue 12.0+

Install this package with composer:

```
composer require rocketslab/rabbitmq-actions
```

### Configure RabbitMQ driver for Laravel Queue

[](#configure-rabbitmq-driver-for-laravel-queue)

---

Follow `vladimir-yuldashev/rabbitmq-queue-laravel` installation.

How to configure in RLQ documentation [yuldashev/rabbitmq-queue-laravel](https://github.com/vyuldashev/laravel-queue-rabbitmq).

### Publish the configuration

[](#publish-the-configuration)

---

```
php artisan vendor:publish --provider=RocketsLab\\RabbitMQActions\\RabbitMQActionsServiceProvider
```

The default action namespace its `App\RabbitMQ\Actions` saving actions at `app/RabbitMQ/Actions` folder. You can change this setting the `namespace` config. For example:

config/rabbitmq-actions.php

```
    ...
    'namespace' => 'MyDomain\\Actions'
    ...
```

When creating new actions, this actions are save at `app/MyDomain/Actions` directory and your actions namespace its changed to `App\MyDomain\Actions`.

### Creating Actions

[](#creating-actions)

---

The motivation for creating this package is to find a way to simplify sending and receiving messages through RabbitMQ. One of the ways I found for this was to use actions to define what type of message is being sent from the producer to be treated as an action by the consumer.

To create an action use the artisan `make:rmq-action` command.

```
php artisan make:rmq-action MyAction
```

The action file looks like this:

```
namespace App\RabbitMQ\Actions;

use RocketsLab\RabbitMQActions\Contracts\Action;

class MyAction implements Action
{
    /**
     * Handles the message data
     *
     * @param mixed $data
     *
     */
    public function handle(mixed $data)
    {
        // Process the message data from broker
    }
}
```

The message data content its passed at the Action handle method.

Actions are automatically registered into the Laravel container. This behavior launches the action as soon as the message is received by the consumer.

### Producing Messages

[](#producing-messages)

---

Installing this package and configuring the application to send messages as a producer is simple. This package class `ProducerMessage` have a single method called `send` that takes three parameters: `$action`, `$data` and an optional `$queue`.

The *action* parameter is the name of action, that translates the name of an action in consumer application.

The *data* parameter is the content data to be send to consumer.

The *queue* parameter is the name of queue. Default is Laravel queue `default`.

Eg: `ProduceMessage::send('my-action', 'hello')`, the `my-action` its the `MyAction` class registered automatically by consumer.

### Custom actions

[](#custom-actions)

---

The default actions name its the name of action Class in **kebab** form.

But sometimes you want to have more control over the name of actions. To customize the actions "keys", register this in `custom_actions` option at config file.

config/rabbitmq-actions.php

```
    ...
    'custom_actions' => [
        'hello-action' => MyAction::class
    ];
    ...
```

in the producer application:

```
    ProducerMessage::send('hello-action', 'world!');
```

in the consumer application:

```
    MyAction handle method its called

```

At moment, once this option is used, the automatic registration its disabled, and you have to register all actions here.

### Roadmap

[](#roadmap)

---

This is a work in progress project. In the future more features can be created.

---

Thank you!

**Don`t forget to leave a star here if I help in any way ;)**

Jorge &lt;@jjsquady&gt; Gonçalves

###  Health Score

21

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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

1372d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eaa735041f66903d9a2873f2e524f9133eae6961f9b9d068510591ba20095dd5?d=identicon)[jjsquady](/maintainers/jjsquady)

---

Top Contributors

[![jjcodes78](https://avatars.githubusercontent.com/u/12722517?v=4)](https://github.com/jjcodes78 "jjcodes78 (2 commits)")

### Embed Badge

![Health badge](/badges/rocketslab-rabbitmq-actions/health.svg)

```
[![Health](https://phpackages.com/badges/rocketslab-rabbitmq-actions/health.svg)](https://phpackages.com/packages/rocketslab-rabbitmq-actions)
```

###  Alternatives

[react/promise

A lightweight implementation of CommonJS Promises/A for PHP

2.5k354.1M506](/packages/react-promise)[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.2M21](/packages/league-geotools)[queue-interop/queue-interop

Promoting the interoperability of MQs objects. Based on Java JMS

48130.0M85](/packages/queue-interop-queue-interop)[amphp/sync

Non-blocking synchronization primitives for PHP based on Amp and Revolt.

18850.5M36](/packages/amphp-sync)[amphp/dns

Async DNS resolution for Amp.

19137.1M37](/packages/amphp-dns)[amphp/parser

A generator parser to make streaming parsers simple.

14950.5M14](/packages/amphp-parser)

PHPackages © 2026

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