-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Move SQS message queue to Amazon provider #50057
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 1 commit into
apache:main
from
potiuk:move-sqs-message-queue-provider-to-amazon
May 1, 2025
Merged
Changes from all commits
Commits
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| .. 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. | ||
|
|
||
| .. _concepts:message-queues: | ||
|
|
||
| Message Queues | ||
| ============== | ||
|
|
||
| The Message Queues are a way to expose capability of external event-driven scheduling of Dags. | ||
|
|
||
| Apache Airflow is primarily designed for time-based and dependency-based scheduling of workflows. However, | ||
| modern data architectures often require near real-time processing and the ability to react to | ||
| events from various sources, such as message queues. | ||
|
|
||
| Airflow has native event-driven capability, allowing users to create workflows that can be | ||
| triggered by external events, thus enabling more responsive data pipelines. | ||
|
|
||
| Airflow supports poll-based event-driven scheduling, where the Triggerer can poll | ||
| external message queues using built-in :class:`airflow.triggers.base.BaseTrigger` classes. This allows users | ||
| to create workflows that can be triggered by external events, such as messages arriving | ||
| in a queue or changes in a database efficiently. | ||
|
|
||
| Airflow constantly monitors the state of an external resource and updates the asset whenever the external | ||
| resource reaches a given state (if it does reach it). To achieve this, we leverage Airflow Triggers. | ||
| Triggers are small, asynchronous pieces of Python code whose job is to poll an external resource state. | ||
|
|
||
| The list of supported message queues is available in :doc:`apache-airflow-providers:core-extensions/message-queues`. |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| {# | ||
| 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. | ||
| #} | ||
| {%for provider, provider_dict in items.items() %} | ||
| {{ provider_dict['name'] }} | ||
| {{ header_separator * (provider_dict['name']|length) }} | ||
|
|
||
| {% for queue in provider_dict['queues'] -%} | ||
| - :class:`~{{ queue }}` | ||
| {% endfor -%} | ||
|
|
||
| {% endfor %} |
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,33 @@ | ||
| .. 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. | ||
|
|
||
| Message Queues | ||
| -------------- | ||
|
|
||
| This is a summary of all Apache Airflow Community provided implementations of Queues | ||
| exposed via community-managed providers. | ||
|
|
||
| Airflow can be extended by providers with Queues. Each provider can define their own Queues, | ||
| that can be configured to handle executing tasks | ||
|
|
||
| The queues are explained in | ||
| :doc:`apache-airflow:core-concepts/message-queues` and you can also see those | ||
| provided by the community-managed providers: | ||
|
|
||
| .. airflow-queues:: | ||
| :tags: None | ||
| :header-separator: " |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| .. 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. | ||
|
|
||
| Amazon Messaging Queues | ||
| ======================= | ||
|
|
||
| Amazon SQS Queue Provider | ||
| ------------------------- | ||
|
|
||
| Implemented by :class:`~airflow.providers.amazon.aws.queues.sqs.SqsMessageQueueProvider` | ||
|
|
||
| The Amazon SQS Queue Provider is a message queue provider that uses | ||
| Amazon Simple Queue Service (SQS) as the underlying message queue system. | ||
| It allows you to send and receive messages using SQS queues in your Airflow workflows. | ||
| The provider supports both standard and FIFO queues, and it provides features | ||
| such as message visibility timeout, message retention period, and dead-letter queues. | ||
|
|
||
| The queue must be matching this regex: | ||
|
|
||
| .. exampleinclude:: /../src/airflow/providers/amazon/aws/queues/sqs.py | ||
| :language: python | ||
| :dedent: 0 | ||
| :start-after: [START queue_regexp] | ||
| :end-before: [END queue_regexp] | ||
|
|
||
|
|
||
| The queue parameter is passed directly to ``sqs_queue`` parameter of the underlying | ||
| :class:`~airflow.providers.amazon.aws.triggers.sqs.SqsSensorTrigger` class, and passes | ||
| all the kwargs directly to the trigger constructor if added. |
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.
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.