PHPackages                             elielelie/laravel-activemq - 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. elielelie/laravel-activemq

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

elielelie/laravel-activemq
==========================

Laravel ActiveMQ driver

v1.0.9(2mo ago)03.4k↓50%2MITPHPPHP ^7.4|^8.0

Since Mar 4Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/eliel-elie/laravel-activemq)[ Packagist](https://packagist.org/packages/elielelie/laravel-activemq)[ RSS](/packages/elielelie-laravel-activemq/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (11)Used By (0)

Laravel ActiveMQ driver
=======================

[](#laravel-activemq-driver)

[![Total Downloads](https://camo.githubusercontent.com/08bffeb08bdeb210a8ab798ce5bfd366ebdeac1d84cd9a408113d34310bc5281/68747470733a2f2f706f7365722e707567782e6f72672f656c69656c656c69652f6c61726176656c2d6163746976656d712f642f746f74616c2e737667)](https://packagist.org/packages/elielelie/laravel-activemq)[![Latest Stable Version](https://camo.githubusercontent.com/3f92fed6c4df11c9d44b9958afbe985f4304f1f6cdb57ec6d0f640e5163f3b47/68747470733a2f2f706f7365722e707567782e6f72672f656c69656c656c69652f6c61726176656c2d6163746976656d712f762f737461626c652e737667)](https://packagist.org/packages/elielelie/laravel-activemq)[![License](https://camo.githubusercontent.com/d358f62d1890e16550c595929a7380513a2838b4b78cd8dda9408b7994553513/68747470733a2f2f706f7365722e707567782e6f72672f656c69656c656c69652f6c61726176656c2d6163746976656d712f6c6963656e73652e737667)](https://packagist.org/packages/elielelie/laravel-activemq)

This package enables usage of ActiveMQ (Stomp) driver for queueing natively inside Laravel.

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

[](#installation)

`composer require elielelie/laravel-activemq`

In order to connect it to your queue you need to change queue connection driver in .env file:

```
QUEUE_CONNECTION=activemq

```

Variables:

```
ACTIVEMQ_PROTOCOL      protocol (defaults to TCP)
ACTIVEMQ_HOST          broker host (defaults to 127.0.0.1)
ACTIVEMQ_PORT          port where STOMP is exposed in your broker (defaults to 61613)
ACTIVEMQ_USERNAME      broker username (defaults to admin)
ACTIVEMQ_PASSWORD      broker password (defaults to admin)

```

You can subscribe to queues to read from or to write to with:

```
ACTIVEMQ_QUEUE=...

```

```
default;email

```

You can see all other available `.env` variables, their defaults and usage explanation within the [config file](config/activemq.php)

You can publish the configuration file by running:

`$ php artisan vendor:publish --provider="Elielelie\ActiveMQ\ActiveMQServiceProvider" `

Failed jobs
-----------

[](#failed-jobs)

For the sake of simplicity and brevity ActiveMQJob class is defined in a way to utilize Laravel tries and backoff properties out of the box ([official documentation](https://laravel.com/docs/8.x/queues#dealing-with-failed-jobs)).

Upon failure, jobs will retry 5 times before being written to failed\_jobs table.

Each subsequent attempt will be tried in attempt^2 seconds, meaning if it is a third attempt, it will retry in 9s after the previous job failure.

Note that job properties by default have precedence over CLI commands, thus with these defaults in place the flags `--tries` and `--backoff` will be overridden.

You can turn off this behavior with following `.env` variables:

- `ACTIVEMQ_AUTO_TRIES` - defaults to `true`. Set to `false` to revert to Laravel default of 0 retries.
- `ACTIVEMQ_AUTO_BACKOFF` - defaults to `true`. Set to `false` to revert to Laravel default of 0s backoff.
- `ACTIVEMQ_BACKOFF_MULTIPLIER` - defaults to `2`. Does nothing if `ACTIVEMQ_AUTO_BACKOFF` is turned off. Increase to make even bigger interval between two failed jobs.

Job will be re-queued to the queue it came from.

Laravel Horizon Support
-----------------------

[](#laravel-horizon-support)

This package now supports Laravel Horizon for advanced queue management with multiple workers and auto-scaling capabilities.

### Configuration

[](#configuration)

To enable Horizon support, add these environment variables:

```
ACTIVEMQ_HORIZON_ENABLED=true
ACTIVEMQ_HORIZON_ISOLATE=true

```

### Horizon Configuration Example

[](#horizon-configuration-example)

Add this configuration to your `config/horizon.php`:

```
'environments' => [
    'production' => [
        'activemq-default' => [
            'connection' => 'activemq',
            'queue' => ['default'],
            'balance' => 'simple',
            'processes' => 3,
        ],
        'activemq-emails' => [
            'connection' => 'activemq',
            'queue' => ['email'],
            'balance' => 'auto',
            'processes' => 2,
            'maxProcesses' => 5,
        ],
        'activemq-notifications' => [
            'connection' => 'activemq',
            'queue' => ['notifications'],
            'balance' => 'simple',
            'processes' => 1,
        ],
    ],
],
```

### Multiple Queue Setup

[](#multiple-queue-setup)

You can define multiple queues in your environment configuration:

```
ACTIVEMQ_QUEUE=default;email;notifications

```

Each supervisor in Horizon can process specific queues, allowing for:

- **Worker Isolation**: Different workers for different queue types
- **Auto-Scaling**: Automatic worker scaling based on queue load
- **Priority Processing**: Different process counts and strategies per queue

### Balancing Strategies

[](#balancing-strategies)

- **simple**: Fixed number of workers distributed evenly
- **auto**: Dynamic worker allocation based on queue load
- **false**: Process queues in order without balancing

Logs
----

[](#logs)

Logs are turned off by default. You can include them by setting env key `ACTIVEMQ_LOGS=true`.

In case you want to change the default log manager, it can be done in the `log-activemq` config file. The new log manager must extend `Illuminate\Log\LogManager`.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance83

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.8% 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 ~119 days

Recently: every ~233 days

Total

10

Last Release

86d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1af6380064aee246aaface6c2b36f5773e670773e7b7f02df1de33c52dd487f4?d=identicon)[elielelie](/maintainers/elielelie)

---

Top Contributors

[![eliel-elie](https://avatars.githubusercontent.com/u/78655902?v=4)](https://github.com/eliel-elie "eliel-elie (30 commits)")[![misakstvanu](https://avatars.githubusercontent.com/u/42741294?v=4)](https://github.com/misakstvanu "misakstvanu (1 commits)")

---

Tags

phplaravelqueuedriverstompactiveMQ

### Embed Badge

![Health badge](/badges/elielelie-laravel-activemq/health.svg)

```
[![Health](https://phpackages.com/badges/elielelie-laravel-activemq/health.svg)](https://phpackages.com/packages/elielelie-laravel-activemq)
```

###  Alternatives

[renoki-co/horizon-exporter

Export Laravel Horizon metrics using this Prometheus exporter.

24152.7k](/packages/renoki-co-horizon-exporter)[webparking/laravel-queue-ensurer

This composer package provides a Laravel queue ensurer.

6416.1k](/packages/webparking-laravel-queue-ensurer)[lokielse/laravel-mns

Aliyun MNS Queue Driver For Laravel

2614.9k](/packages/lokielse-laravel-mns)[mayconbordin/l5-stomp-queue

Stomp Queue Driver for Laravel 5

121.1k](/packages/mayconbordin-l5-stomp-queue)

PHPackages © 2026

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