-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Add Azure Service Bus Queue and Subscription triggers for async message processing #53356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
potiuk
merged 27 commits into
apache:main
from
prdai:ffr/aip-82-add-azure-message-bus-integration
Nov 24, 2025
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
9808f2c
Add Azure Service Bus integration with triggers and documentation
prdai b31564d
Implement Azure Service Bus Queue and Subscription triggers with asyn…
prdai 88e9e91
Merge branch 'main' into ffr/aip-82-add-azure-message-bus-integration
prdai 7964971
Merge branch 'main' into ffr/aip-82-add-azure-message-bus-integration
prdai af956ab
feat(Azure): Add methods to read messages from Service Bus queue and …
prdai ee3742e
Merge branch 'main' into ffr/aip-82-add-azure-message-bus-integration
prdai c9dc444
Update providers/microsoft/azure/src/airflow/providers/microsoft/azur…
prdai ea5be12
Update providers/microsoft/azure/src/airflow/providers/microsoft/azur…
prdai f32cc2e
Update providers/microsoft/azure/src/airflow/providers/microsoft/azur…
prdai 0fc82fc
Merge branch 'main' into ffr/aip-82-add-azure-message-bus-integration
prdai 51cc11b
Remove Queue URI format documentation for Azure Service Bus Queue and…
prdai a36238f
Merge branch 'main' into ffr/aip-82-add-azure-message-bus-integration
prdai e32438b
Merge branch 'main' into ffr/aip-82-add-azure-message-bus-integration
prdai 2b962c4
Enhance Azure Service Bus integration by adding new message types and…
prdai dab8917
Fix Azure Service Bus message trigger test failures
prdai 0ec2cfd
Merge branch 'main' into ffr/aip-82-add-azure-message-bus-integration
prdai 17f4e0a
Fix Azure Service Bus trigger test mocking issues
prdai f106eea
Update the Trigger Event Message to Include the Actual Content
prdai f7d8470
Merge remote-tracking branch 'upstream/main' into ffr/aip-82-add-azur…
prdai bc40ae6
resolve review comments
prdai 86bb974
Merge branch 'main' into ffr/aip-82-add-azure-message-bus-integration
prdai ec7dbbf
Merge branch 'main' into ffr/aip-82-add-azure-message-bus-integration
prdai fac1b19
Merge branch 'main' into ffr/aip-82-add-azure-message-bus-integration
prdai 8831f2d
chore: change BaseTrigger to BaseEventTrigger
prdai 8b1f57f
Update providers/microsoft/azure/src/airflow/providers/microsoft/azur…
prdai 3fe57fd
chore: fix ci/cd
prdai 0d35d14
Merge branch 'main' into ffr/aip-82-add-azure-message-bus-integration
jason810496 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
providers/microsoft/azure/docs/connections/message_bus.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| .. Licensed to the Apache Software Foundation (ASF) under one | ||
| or more contributor license agreements. See the NOTICE file | ||
| distributed with this work for additional information | ||
| regarding copyright ownership. The ASF licenses this file | ||
| to you under the Apache License, Version 2.0 (the | ||
| "License"); you may not use this file except in compliance | ||
| with the License. You may obtain a copy of the License at | ||
|
|
||
| .. http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| .. Unless required by applicable law or agreed to in writing, | ||
| software distributed under the License is distributed on an | ||
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations | ||
| under the License. | ||
|
|
||
| .. _howto/trigger:azure_service_bus_queue: | ||
|
|
||
| Microsoft Azure Service Bus Queue Trigger | ||
| ========================================= | ||
|
|
||
| The Microsoft Azure Service Bus Queue trigger enables you to monitor Azure Service Bus queues for new messages and trigger DAG runs when messages arrive. | ||
|
|
||
| Authenticating to Azure | ||
| ----------------------- | ||
|
|
||
| The trigger uses the connection you have configured in Airflow to connect to Azure. | ||
| Please refer to the :ref:`howto/connection:azure_service_bus` documentation for details on how to configure your connection. | ||
|
|
||
| Using the Trigger | ||
| ----------------- | ||
|
|
||
| This example shows how to use the ``AzureServiceBusQueueTrigger``. | ||
|
|
||
| .. code-block:: python | ||
|
|
||
| from airflow.providers.microsoft.azure.triggers.message_bus import AzureServiceBusQueueTrigger | ||
|
|
||
| trigger = AzureServiceBusQueueTrigger( | ||
| queues=["my_queue"], | ||
| azure_service_bus_conn_id="azure_service_bus_default", | ||
| max_message_count=1, | ||
| poll_interval=5.0, | ||
| ) | ||
|
|
||
| # The trigger will fire when a message is available in the queue. | ||
|
|
||
| .. _howto/trigger:azure_service_bus_subscription: | ||
|
|
||
| Microsoft Azure Service Bus Subscription Trigger | ||
| ================================================ | ||
|
|
||
| The Microsoft Azure Service Bus Subscription trigger enables you to monitor Azure Service Bus topic subscriptions for new messages and trigger DAG runs when messages arrive. | ||
|
|
||
| Authenticating to Azure | ||
| ----------------------- | ||
|
|
||
| The trigger uses the connection you have configured in Airflow to connect to Azure. | ||
| Please refer to the :ref:`howto/connection:azure_service_bus` documentation for details on how to configure your connection. | ||
|
|
||
| Using the Trigger | ||
| ----------------- | ||
|
|
||
| This example shows how to use the ``AzureServiceBusSubscriptionTrigger``. | ||
|
|
||
| .. code-block:: python | ||
|
|
||
| from airflow.providers.microsoft.azure.triggers.message_bus import AzureServiceBusSubscriptionTrigger | ||
|
|
||
| trigger = AzureServiceBusSubscriptionTrigger( | ||
| topics=["my_topic"], | ||
| subscription_name="my_subscription", | ||
| azure_service_bus_conn_id="azure_service_bus_default", | ||
| max_message_count=1, | ||
| poll_interval=5.0, | ||
| ) | ||
|
|
||
| # The trigger will fire when a message is available in the topic subscription. | ||
|
|
||
| Azure Service Bus Message Queue | ||
| =============================== | ||
|
|
||
| Azure Service Bus Queue Provider | ||
| -------------------------------- | ||
|
|
||
| Implemented by :class:`~airflow.providers.microsoft.azure.triggers.message_bus.AzureServiceBusQueueTrigger` | ||
|
|
||
| The Azure Service Bus Queue Provider is a message queue provider that uses Azure Service Bus queues. | ||
| It allows you to monitor Azure Service Bus queues for new messages and trigger DAG runs when messages arrive. | ||
|
|
||
|
|
||
| Azure Service Bus Subscription Provider | ||
| --------------------------------------- | ||
|
|
||
| Implemented by :class:`~airflow.providers.microsoft.azure.triggers.message_bus.AzureServiceBusSubscriptionTrigger` | ||
|
|
||
| The Azure Service Bus Subscription Provider is a message queue provider that uses Azure Service Bus topic subscriptions. | ||
| It allows you to monitor Azure Service Bus topic subscriptions for new messages and trigger DAG runs when messages arrive. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.