{"id":23062456,"url":"https://github.com/aymdev/messengerazurebundle","last_synced_at":"2025-09-01T08:13:51.460Z","repository":{"id":37038953,"uuid":"457886229","full_name":"AymDev/MessengerAzureBundle","owner":"AymDev","description":"A Symfony 4/5/6 bundle providing a Messenger transport for Azure Service Bus using the Azure REST API.","archived":false,"fork":false,"pushed_at":"2024-02-14T21:11:37.000Z","size":82,"stargazers_count":12,"open_issues_count":7,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-15T08:42:07.700Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AymDev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-10T17:46:31.000Z","updated_at":"2025-03-06T15:58:39.000Z","dependencies_parsed_at":"2024-12-16T03:27:25.672Z","dependency_job_id":"70ebf727-55ad-4fc7-8d57-cdcb8d4fecc7","html_url":"https://github.com/AymDev/MessengerAzureBundle","commit_stats":{"total_commits":27,"total_committers":4,"mean_commits":6.75,"dds":"0.33333333333333337","last_synced_commit":"195c429de0c7b4b9d4453ed33db79c38f00d7a04"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/AymDev/MessengerAzureBundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AymDev%2FMessengerAzureBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AymDev%2FMessengerAzureBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AymDev%2FMessengerAzureBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AymDev%2FMessengerAzureBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AymDev","download_url":"https://codeload.github.com/AymDev/MessengerAzureBundle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AymDev%2FMessengerAzureBundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273094094,"owners_count":25044439,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-16T03:27:06.265Z","updated_at":"2025-09-01T08:13:51.439Z","avatar_url":"https://github.com/AymDev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Messenger Azure Service Bus Bundle\r\nA **PHP 8.1+** \u0026 **Symfony 5 / 6 / 7** bundle providing a **Symfony Messenger** *transport* for **Azure Service Bus** using the *Azure REST API*.\r\n\r\n![Testing](https://github.com/AymDev/MessengerAzureBundle/workflows/Testing/badge.svg)\r\n![Coding Standards](https://github.com/AymDev/MessengerAzureBundle/workflows/Coding%20Standards/badge.svg)\r\n![Bundle installation](https://github.com/AymDev/MessengerAzureBundle/workflows/Bundle%20installation/badge.svg)\r\n[![Latest Stable Version](https://poser.pugx.org/aymdev/messenger-azure-bundle/v)](//packagist.org/packages/aymdev/messenger-azure-bundle)\r\n[![License](https://poser.pugx.org/aymdev/messenger-azure-bundle/license)](//packagist.org/packages/aymdev/messenger-azure-bundle)\r\n\r\n## Installation\r\n\r\nYou only need to install the bundle using **Composer**:\r\n```shell\r\ncomposer require aymdev/messenger-azure-bundle\r\n```\r\nAs it uses [Symfony HttpClient](https://symfony.com/doc/current/http_client.html),\r\nyou will need to install a [PSR-18 client](https://symfony.com/doc/current/http_client.html#psr-18-and-psr-17).\r\nExample:\r\n```shell\r\ncomposer require nyholm/psr7\r\n```\r\n\r\n## Configuration\r\n\r\n### Transport DSN\r\n\r\nYour DSN must respect the following format to build the authentication header for a specific *namespace*:\r\n```\r\nazure://KEY_NAME:KEY_VALUE@NAMESPACE\r\n```\r\n\u003eWhere `KEY_NAME` is your **shared access key name**, `KEY_VALUE` is your **shared access key** and `NAMESPACE` is your\r\n\u003e*Azure Service Bus* **namespace**.\r\n\u003e**Important note:** the keys can contain special characters that could break the URL parsing. Be sure to URL encode\r\n\u003ethem.\r\n\r\n### Transport options\r\n\r\nDetailed list of transport options:\r\n\r\n| Option name | Description | Required | Default value |  \r\n| ------------- | ------------- | ----: | ----: |\r\n| `entity_path`  | The **topic** or **queue** name.  | Yes | |\r\n| `subscription`  | The subcription name to consume messages from a **topic**.  | Only for *topic consumer transports* | |\r\n| `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` |\r\n| `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` |\r\n\r\nExample `config/packages/messenger.yaml`:\r\n```yaml\r\nframework:\r\n    messenger:\r\n        transports:\r\n            azure_transport:\r\n                dsn: '%env(AZURE_SERVICE_BUS_DSN)%'\r\n                serializer: 'App\\Messenger\\YourAzureSerializer'\r\n                options:\r\n                    entity_path: 'your-topic'\r\n                    subscription: 'subscription-name'\r\n                    token_expiry: 60\r\n                    receive_mode: 'receive-and-delete'\r\n```\r\n\r\n## Stamps\r\n\r\nThis transport provides a few stamps:\r\n\r\n### AzureMessageStamp\r\n\r\nThe `AymDev\\MessengerAzureBundle\\Messenger\\Stamp\\AzureMessageStamp` stamp is added to sent and received messages and\r\ncontains:\r\n\r\n - the *topic* or *queue* name\r\n - the original sent/received message\r\n - the subscription name for received messages from *topics*\r\n - the delete URL for received messages in `peek-lock` receive mode \r\n\r\n### AzureBrokerPropertiesStamp\r\n\r\nThe `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).\r\nIt is automatically decoded when consuming a message and is encoded when producing a message if added to the *envelope*.\r\n\r\n## Serialization\r\n\r\n### Creating your serializers\r\nThere is no serializer provided, but here is the expected array structure of an encoded envelope:\r\n\r\n - `body`: your plain text message\r\n - `headers`: optional HTTP headers (either received from *Azure Service Bus* response or to send to the REST API)\r\n\r\n### Logging decoding errors\r\nWhen a serializer throws a `Symfony\\Component\\Messenger\\Exception\\MessageDecodingFailedException` while decoding a message,\r\nit will be converted to a `AymDev\\MessengerAzureBundle\\Messenger\\Exception\\SerializerDecodingException` which contains an\r\nenvelope with an empty message but with the same stamps as a successfully decoded message.\r\n\r\nYou can then [listen](https://symfony.com/doc/current/event_dispatcher.html) to the `console.error` Symfony event and get\r\nthe topic/queue name where then decoding failure happened, the original message, etc.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymdev%2Fmessengerazurebundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faymdev%2Fmessengerazurebundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymdev%2Fmessengerazurebundle/lists"}