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 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 Message Queues.