potiuk commented on code in PR #50057:
URL: https://github.com/apache/airflow/pull/50057#discussion_r2069552447


##########
providers/common/messaging/src/airflow/providers/common/messaging/providers/__init__.py:
##########
@@ -16,6 +16,27 @@
 # under the License.
 from __future__ import annotations
 
-from airflow.providers.common.messaging.providers.sqs import 
SqsMessageQueueProvider
+import importlib
 
-MESSAGE_QUEUE_PROVIDERS = [SqsMessageQueueProvider()]
+from airflow.providers_manager import ProvidersManager
+from airflow.utils.deprecation_tools import add_deprecated_classes
+
+providers_manager = ProvidersManager()
+providers_manager.initialize_providers_queues()
+
+
+def create_class_by_name(name: str):
+    module_name, class_name = name.rsplit(".", 1)
+    module = importlib.import_module(module_name)
+    return getattr(module, class_name)
+
+
+MESSAGE_QUEUE_PROVIDERS = [create_class_by_name(name) for name in 
providers_manager.queue_class_names]
+
+__deprecated_classes = {

Review Comment:
   Added back-compatibility in case someone already used the SQS provider from 
here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to