AwaitMessageTriggerFunctionSensor take long time to trigger event_triggered_function #34469
-
Apache Airflow version2.7.1 What happenedHi guys, i'm using the AwaitMessageTriggerFunctionSensor with the following example on your Docs: https://github.com/apache/airflow/blob/providers-apache-kafka/1.1.2/tests/system/providers/apache/kafka/example_dag_event_listener.py The issue is when I trigger 'fizzbuzz-load-topic' run only take 5 seconds to load kafka connection config and push 50 messages to the topic 'fizz_buzz' but the 'fizz-buzz' dag take up to 10 minutes to be triggered 3 times by 'pick_downstream_dag' task. The amount of time from when the last message was sent until it was processed by 'fizzbuzz-listener-dag' is very long. Can you give a hand here please? Thanks What you think should happen insteadI expected the dag 'fizz-buzz' will be triggered near real time, I try to modify poll_timeout and poll_interval to 0.00001 and 0.00005 second to be able to achieve that but I can't. Did I miss anything? How to reproduceI don't know how to help improve it. Operating SystemPython 3.8 Ubuntu 20.04 - Linux Versions of Apache Airflow Providersapache-airflow-providers-apache-kafka==1.1.2 Deploymentapache-airflow[postgres, rabbitmq, celery, crypto]==2.7.1 Deployment detailsNo response Anything elseNo response Are you willing to submit PR?
Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
https://airflow.apache.org/docs/apache-airflow/stable/index.html#why-not-airflow I have a look at the example, and either it is a bad example and should not use airflow/tests/system/providers/apache/kafka/example_dag_event_listener.py Lines 110 to 113 in ba0bab0 🤦 🤦 🤦 |
Beta Was this translation helpful? Give feedback.
Unfortunetly this example contain worst advice in Airflow, somehow this was missed during PR when Kafka provider was added. Sometimes it happen we all humans and could miss something. But I hope this sample would be removed in the next release of provider, see: #34470
10ms it is not possible due to initial design and purpose of Airflow: run Batch tasks, something might (or might not) change in the future but ri…