PHPackages                             aymdev/messenger-azure-bundle - 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. aymdev/messenger-azure-bundle

ActiveSymfony-bundle[Queues &amp; Workers](/categories/queues)

aymdev/messenger-azure-bundle
=============================

Symfony Messenger bundle for Azure Service Bus

v3.0.0(3mo ago)12223.2k—5.8%8[4 issues](https://github.com/AymDev/MessengerAzureBundle/issues)1MITPHPPHP ^8.4CI passing

Since Feb 10Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/AymDev/MessengerAzureBundle)[ Packagist](https://packagist.org/packages/aymdev/messenger-azure-bundle)[ RSS](/packages/aymdev-messenger-azure-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (12)Used By (1)

Messenger Azure Service Bus Bundle
==================================

[](#messenger-azure-service-bus-bundle)

A **PHP 8.4+** &amp; **Symfony 6 / 7 / 8** bundle providing a **Symfony Messenger** *transport* for **Azure Service Bus** using the *Azure REST API*.

[![Testing](https://github.com/AymDev/MessengerAzureBundle/workflows/Testing/badge.svg)](https://github.com/AymDev/MessengerAzureBundle/workflows/Testing/badge.svg)[![Coding Standards](https://github.com/AymDev/MessengerAzureBundle/workflows/Coding%20Standards/badge.svg)](https://github.com/AymDev/MessengerAzureBundle/workflows/Coding%20Standards/badge.svg)[![Bundle installation](https://github.com/AymDev/MessengerAzureBundle/workflows/Bundle%20installation/badge.svg)](https://github.com/AymDev/MessengerAzureBundle/workflows/Bundle%20installation/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/b7bafc7e6937eee50a0b0ba30b1cc414f08685a1c67e7e2d4c7556f1eae52ef1/68747470733a2f2f706f7365722e707567782e6f72672f61796d6465762f6d657373656e6765722d617a7572652d62756e646c652f76)](//packagist.org/packages/aymdev/messenger-azure-bundle)[![License](https://camo.githubusercontent.com/0cb239418f4ee6df82cf8e9eaafe7aba70c1b84040ed05058df25490a6559524/68747470733a2f2f706f7365722e707567782e6f72672f61796d6465762f6d657373656e6765722d617a7572652d62756e646c652f6c6963656e7365)](//packagist.org/packages/aymdev/messenger-azure-bundle)

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

[](#installation)

You only need to install the bundle using **Composer**:

```
composer require aymdev/messenger-azure-bundle
```

As it uses [Symfony HttpClient](https://symfony.com/doc/current/http_client.html), you will need to install a [PSR-18 client](https://symfony.com/doc/current/http_client.html#psr-18-and-psr-17). Example:

```
composer require nyholm/psr7
```

Configuration
-------------

[](#configuration)

### Transport DSN

[](#transport-dsn)

Your DSN must respect the following format to build the authentication header for a specific *namespace*:

```
azure://KEY_NAME:KEY_VALUE@NAMESPACE

```

> Where `KEY_NAME` is your **shared access key name**, `KEY_VALUE` is your **shared access key** and `NAMESPACE` is your *Azure Service Bus* **namespace**. **Important note:** the keys can contain special characters that could break the URL parsing. Be sure to URL encode them.

### Transport options

[](#transport-options)

Detailed list of transport options:

Option nameDescriptionRequiredDefault value`entity_path`The **topic** or **queue** name.Yes`subscription`The subcription name to consume messages from a **topic**.Only for *topic consumer transports*`token_expiry`[SAS token](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-sas#generate-a-shared-access-signature-token) validity duration in seconds.`3600``receive_mode`Set to `peek-lock` to perform a [non destructive read](https://docs.microsoft.com/en-us/rest/api/servicebus/peek-lock-message-non-destructive-read) or to `receive-and-delete` to perform a [destructive-read](https://docs.microsoft.com/en-us/rest/api/servicebus/receive-and-delete-message-destructive-read)`peek-lock`Example `config/packages/messenger.yaml`:

```
framework:
    messenger:
        transports:
            azure_transport:
                dsn: '%env(AZURE_SERVICE_BUS_DSN)%'
                serializer: 'App\Messenger\YourAzureSerializer'
                options:
                    entity_path: 'your-topic'
                    subscription: 'subscription-name'
                    token_expiry: 60
                    receive_mode: 'receive-and-delete'
```

Stamps
------

[](#stamps)

This transport provides a few stamps:

### AzureMessageStamp

[](#azuremessagestamp)

The `AymDev\MessengerAzureBundle\Messenger\Stamp\AzureMessageStamp` stamp is added to sent and received messages and contains:

- the *topic* or *queue* name
- the original sent/received message
- the subscription name for received messages from *topics*
- the delete URL for received messages in `peek-lock` receive mode

### AzureBrokerPropertiesStamp

[](#azurebrokerpropertiesstamp)

The `AymDev\MessengerAzureBundle\Messenger\Stamp\AzureBrokerPropertiesStamp` stamp is used for the [message properties](https://docs.microsoft.com/en-us/rest/api/servicebus/message-headers-and-properties). It is automatically decoded when consuming a message and is encoded when producing a message if added to the *envelope*.

Serialization
-------------

[](#serialization)

### Creating your serializers

[](#creating-your-serializers)

There is no serializer provided, but here is the expected array structure of an encoded envelope:

- `body`: your plain text message
- `headers`: optional HTTP headers (either received from *Azure Service Bus* response or to send to the REST API)

### Logging decoding errors

[](#logging-decoding-errors)

When a serializer throws a `Symfony\Component\Messenger\Exception\MessageDecodingFailedException` while decoding a message, it will be converted to a `AymDev\MessengerAzureBundle\Messenger\Exception\SerializerDecodingException` which contains an envelope with an empty message but with the same stamps as a successfully decoded message.

You can then [listen](https://symfony.com/doc/current/event_dispatcher.html) to the `console.error` Symfony event and get the topic/queue name where then decoding failure happened, the original message, etc.

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance75

Regular maintenance activity

Popularity43

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 53.7% 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 ~162 days

Recently: every ~303 days

Total

10

Last Release

97d ago

Major Versions

v1.5.0 → v2.0.02024-02-14

v2.0.0 → v3.0.02026-02-10

PHP version history (3 changes)v1.0.0PHP ^7.3|^8.0

v2.0.0PHP ^8.1

v3.0.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/58fe05cbfb0d7e61f369dabfdd2bac390e8e93bfbd4634a9cc6c1e7786efaaf3?d=identicon)[aymdev](/maintainers/aymdev)

---

Top Contributors

[![AymDev](https://avatars.githubusercontent.com/u/22072016?v=4)](https://github.com/AymDev "AymDev (22 commits)")[![HUG-socloz](https://avatars.githubusercontent.com/u/47811050?v=4)](https://github.com/HUG-socloz "HUG-socloz (8 commits)")[![pepamartinec](https://avatars.githubusercontent.com/u/271753?v=4)](https://github.com/pepamartinec "pepamartinec (8 commits)")[![JokubasR](https://avatars.githubusercontent.com/u/3471628?v=4)](https://github.com/JokubasR "JokubasR (3 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/aymdev-messenger-azure-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/aymdev-messenger-azure-bundle/health.svg)](https://phpackages.com/packages/aymdev-messenger-azure-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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