PHPackages                             digitalclaim/azure-queue-laravel - 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. digitalclaim/azure-queue-laravel

ActiveLibrary

digitalclaim/azure-queue-laravel
================================

Azure Storage Queue for Laravel based on triggered Azure Functions.

1.x-dev(2mo ago)3314↓50%[1 PRs](https://github.com/digitalclaim/azure-queue-laravel/pulls)MITPHPPHP ^8.1CI passing

Since Feb 14Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/digitalclaim/azure-queue-laravel)[ Packagist](https://packagist.org/packages/digitalclaim/azure-queue-laravel)[ Docs](https://github.com/milo/azure-queue-laravel)[ GitHub Sponsors](https://github.com/digitalclaim)[ RSS](/packages/digitalclaim-azure-queue-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (15)Versions (17)Used By (0)

This is my package azure-queue-laravel
======================================

[](#this-is-my-package-azure-queue-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/67dd3b16e110be7645c335c55fc8eae0d9241a394c7723c43a521446318748d2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6469676974616c636c61696d2f617a7572652d71756575652d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/digitalclaim/azure-queue-laravel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/91e35dd03b55661f06f7a8c3dee021ae3c36b884646541969a44c4a3fb6fc644/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6469676974616c636c61696d2f617a7572652d71756575652d6c61726176656c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/digitalclaim/azure-queue-laravel/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/634825eb1280f7c5ff154dc7d07fa2b317788458b4c9abc83e0551d39afa0c7f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6469676974616c636c61696d2f617a7572652d71756575652d6c61726176656c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/digitalclaim/azure-queue-laravel/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/bba87542a1fdfb57c4ed2e041e511496716c35b877cc45020a54de44903ebd96/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6469676974616c636c61696d2f617a7572652d71756575652d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/milo/azure-queue-laravel)

Azure Storage Queue for Laravel. This works fundamentally different than the normal Laravel queue worker. We will push items to the storage queue as usual, but instead of constant pulling with something like `queue:liste` we use Azure Storage Queue trigger to call a Azure Function. The Azure Function will then call our Laravel app with the job payload to process it. There is no need to run a `queue:work/listen` command.

This package is inspired by [stackkit/laravel-google-cloud-tasks-queue](https://github.com/stackkit/laravel-google-cloud-tasks-queue) and based on [squigg/azure-queue-laravel](https://github.com/squigg/azure-queue-laravel).

Warning: Currently we do not save failed jobs in any way. However, it's possible to use Laravel queue callbacks to do so.

```
public function boot(): void
{
    Queue::before(function (JobProcessing $event) {
        // before processing
    });

    Queue::after(function (JobProcessed $event) {
        // after processing
    });

    Queue::exceptionOccurred(function (JobExceptionOccurred $event) {
        // on error (for each retry)
    });

    Queue::failing(function (JobFailed $event) {
        // on fail (after all retries)
    });
}
```

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

[](#installation)

You can install the package via composer:

```
composer require digitalclaim/azure-queue-laravel
```

You can publish the config file with:

```
php artisan vendor:publish --tag="azure-queue-laravel-config"
```

With the config it is possible to set a custom repository for the payload. This is usefull when one has to work with messages &gt; 64kb (Azure Limit). This is the contents of the published config file:

```
use DigitalClaim\AzureQueue\PayloadRepository;

return [
    'job' => [
        'payloadRepository' => PayloadRepository::class,
    ],
    'worker' => [
        'backoff' => env('DIGITALCLAIM_AZURE_QUEUE_LARAVEL_BACKOFF', 60 * 5),
        'maxTries' => env('DIGITALCLAIM_AZURE_QUEUE_LARAVEL_MAXTRIES', 3),
    ],
];
```

Some example for a custom payload repository:

```
'job' => [
    'payloadRepository' => new class extends \DigitalClaim\AzureQueue\PayloadRepository
    {
        /**
         * get entry to load long message text
         */
        public function get(QueueMessage $message): string
        {
            $payload = json_decode($message->getMessageText(), true);

            $entry = ...; // load entry from you db

            return json_encode($entry['payload']);
        }

        /**
         * create entry to store long message text and returns the short message text (max 64kb) for the Azure Queue
         */
        public function create(string $payload): string
        {
            $payload = json_decode($payload, true);

            $id = ...; // save payload to db entry

            return json_encode([
                'id' => $id,
            ]);
        }
    },
],
```

Usage
-----

[](#usage)

1. You already have setup your Azure App Service and Storage Account
2. Add new queue connection in `config/queue.php`

```
'azure'      => [
    'driver' => 'azurepush', // Leave this as-is
    'protocol' => 'https', // https or http
    'accountname' => env('AZURE_QUEUE_STORAGE_NAME'), // Azure storage account name
    'key' => env('AZURE_QUEUE_KEY'), // Access key for storage account
    'queue' => env('AZURE_QUEUE_NAME'), // Queue container name
    'endpoint' => env('AZURE_QUEUE_ENDPOINTSUFFIX'), // Optional endpoint suffix if different from core.windows.net
    'queue_endpoint' => env('AZURE_QUEUE_ENDPOINT'), // Optional endpoint for custom addresses like http://localhost/my_storage_name
],
```

3. Set environment variables

```
QUEUE_CONNECTION=azure

AZURE_QUEUE_STORAGE_NAME=YOUR_QUEUE_STORAGE_NAME
AZURE_QUEUE_KEY=YOUR_QUEUE_KEY
AZURE_QUEUE_NAME=YOUR_QUEUE_NAME
#AZURE_QUEUE_ENDPOINTSUFFIX=core.windows.net
#AZURE_QUEUE_ENDPOINT=https
```

4. Trigger Azure Function (nodejs) for new queue items (see )

```
const axios = require("axios");

module.exports = async function (context, myQueueItem, more) {
    await instance.post(process.env["QUEUE_CALLBACK_URL"], {
        id: context.triggerMetadata.id,
        message: queueItem,
        meta: {
            dequeueCount: context.triggerMetadata.dequeueCount,
            expirationTime: context.triggerMetadata.expirationTime,
            insertionTime: context.triggerMetadata.insertionTime,
            nextVisibleTime: context.triggerMetadata.nextVisibleTime,
            popReceipt: context.triggerMetadata.popReceipt,
        },
    });
};
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [MiloTischler](https://github.com/milo)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance85

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.9% 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 ~67 days

Recently: every ~28 days

Total

12

Last Release

88d ago

### Community

Maintainers

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

---

Top Contributors

[![MiloTischler](https://avatars.githubusercontent.com/u/1629420?v=4)](https://github.com/MiloTischler "MiloTischler (46 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (10 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")[![milo-dcm](https://avatars.githubusercontent.com/u/145595542?v=4)](https://github.com/milo-dcm "milo-dcm (1 commits)")

---

Tags

laraveldigitalclaimazure-queue-laravel

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/digitalclaim-azure-queue-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/digitalclaim-azure-queue-laravel/health.svg)](https://phpackages.com/packages/digitalclaim-azure-queue-laravel)
```

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[sunchayn/nimbus

A Laravel package providing an in-browser API client with automatic schema generation, live validation, and built-in authentication with a touch of Laravel-tailored magic for effortless API testing.

29428.0k](/packages/sunchayn-nimbus)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[codebar-ag/laravel-flysystem-cloudinary

Cloudinary Flysystem v1 integration with Laravel

1224.9k2](/packages/codebar-ag-laravel-flysystem-cloudinary)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1221.1k](/packages/codebar-ag-laravel-docuware)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)

PHPackages © 2026

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