PHPackages                             asseco-voice/laravel-stomp - 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. asseco-voice/laravel-stomp

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

asseco-voice/laravel-stomp
==========================

Laravel Stomp driver

v4.0.6(1y ago)57.6k↓100%4[4 PRs](https://github.com/asseco-voice/laravel-stomp/pulls)2MITPHPPHP ^8.2CI passing

Since Feb 10Pushed 1y ago6 watchersCompare

[ Source](https://github.com/asseco-voice/laravel-stomp)[ Packagist](https://packagist.org/packages/asseco-voice/laravel-stomp)[ RSS](/packages/asseco-voice-laravel-stomp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (27)Used By (2)

[![](https://github.com/asseco-voice/art/raw/main/evil_logo.png)](https://see.asseco.com)

Laravel Stomp driver
====================

[](#laravel-stomp-driver)

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

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

[](#installation)

Package is installed through composer and is automatically registered as a Laravel service provider.

`composer require asseco-voice/laravel-stomp`

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

```
QUEUE_CONNECTION=stomp

```

Connection variables:

```
STOMP_PROTOCOL      protocol (defaults to TCP)
STOMP_HOST          broker host (defaults to 127.0.0.1)
STOMP_PORT          port where STOMP is exposed in your broker (defaults to 61613)
STOMP_USERNAME      broker username (defaults to admin)
STOMP_PASSWORD      broker password (defaults to admin)

```

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

```
STOMP_READ_QUEUES=...
STOMP_WRITE_QUEUES=...

```

Both have same nomenclature when it comes to subscribing:

```
topic                         [
            'connection' => 'stomp',
            'queue' => [env('STOMP_READ_QUEUES', 'default')],
            ...
        ],
    ],

    'local' => [
        'supervisor-1' => [
            'connection' => 'stomp',
            'queue' => [env('STOMP_READ_QUEUES', 'default')],
            ...
        ],
    ],
],

```

If you need a custom configuration, publish Horizon config (check Horizon documentation) and adapt to your needs.

Non-Laravel events
------------------

[](#non-laravel-events)

It is possible to handle outside events as well. By default, if event is not a standard Laravel event it gets re-thrown as a `stomp.*` event with payload it received.

If the frame you received belongs to a `topic::test_queue` queue, system will throw a `stomp.topic.test_queue` event, otherwise if for some reason the queue name can't be parsed it will dispatch a `stomp.event` event.

You can listen to it by including this in `EventServiceProvider::boot()`:

```
Event::listen('stomp.*', function ($event, $payload) {
    ...
});

```

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

[](#failed-jobs)

For the sake of simplicity and brevity `StompJob` 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:

- `STOMP_AUTO_TRIES` - defaults to `true`. Set to `false` to revert to Laravel default of `0` retries.
- `STOMP_AUTO_BACKOFF` - defaults to `true`. Set to `false` to revert to Laravel default of `0s` backoff.
- `STOMP_BACKOFF_MULTIPLIER` - defaults to `2`. Does nothing if `STOMP_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.

### Headers

[](#headers)

Due to the fact that Laravel doesn't save event headers to `failed_jobs` table, this package is circumventing this by storing headers as a part of the payload in `_headers` key. This is all done automatically behind the scenes so no interaction is needed with it.

If you want to append additional headers to your events, you can do so by implementing `HasHeaders` interface.

Raw data
--------

[](#raw-data)

In case you need your service to communicate with external non-Laravel services it is possible to circumvent Laravel event wrapping by implementing `HasRawData` interface. This will enable you to provide a custom payload to the broker.

Logs
----

[](#logs)

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

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

Usage
-----

[](#usage)

You can use library now like being native Laravel queue. For usage, you can check [official Laravel queue documentation](https://laravel.com/docs/8.x/queues).

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance42

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 82.6% 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 ~76 days

Recently: every ~66 days

Total

20

Last Release

459d ago

Major Versions

v0.4.0 → v1.0.02022-04-27

v0.4.1 → v1.1.02022-07-26

v0.4.2 → v2.0.02022-08-18

v2.0.0 → v3.0.02023-08-08

v3.0.0 → v4.0.02024-05-14

PHP version history (5 changes)v0.1.0PHP ^7.4

v0.2.0PHP ^7.4 || ^8.0

v1.0.0PHP ^8.0

v3.0.0PHP ^8.1

v4.0.6PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![Norgul](https://avatars.githubusercontent.com/u/11718157?v=4)](https://github.com/Norgul "Norgul (57 commits)")[![ngaspari](https://avatars.githubusercontent.com/u/33628128?v=4)](https://github.com/ngaspari "ngaspari (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![josip-milotic](https://avatars.githubusercontent.com/u/42002911?v=4)](https://github.com/josip-milotic "josip-milotic (2 commits)")[![assefvisic](https://avatars.githubusercontent.com/u/60132037?v=4)](https://github.com/assefvisic "assefvisic (1 commits)")

---

Tags

laravellaravel-8-packagelaravel-stompphpphp7stompstomp-clientphplaravelqueuedriverstomp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/asseco-voice-laravel-stomp/health.svg)

```
[![Health](https://phpackages.com/badges/asseco-voice-laravel-stomp/health.svg)](https://phpackages.com/packages/asseco-voice-laravel-stomp)
```

###  Alternatives

[mpbarlow/laravel-queue-debouncer

A wrapper job for debouncing other queue jobs.

63714.4k1](/packages/mpbarlow-laravel-queue-debouncer)[renoki-co/horizon-exporter

Export Laravel Horizon metrics using this Prometheus exporter.

24152.7k](/packages/renoki-co-horizon-exporter)[lokielse/laravel-mns

Aliyun MNS Queue Driver For Laravel

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

This composer package provides a Laravel queue ensurer.

6416.1k](/packages/webparking-laravel-queue-ensurer)[convenia/pigeon

3233.0k](/packages/convenia-pigeon)[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)
