vincbeck commented on code in PR #51718:
URL: https://github.com/apache/airflow/pull/51718#discussion_r2150231978


##########
providers/apache/kafka/src/airflow/providers/apache/kafka/triggers/msg_queue.py:
##########
@@ -0,0 +1,102 @@
+# 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.
+from __future__ import annotations
+
+from collections.abc import Sequence
+from typing import Any
+
+from airflow.providers.common.messaging.triggers.msg_queue import 
MessageQueueTrigger
+
+
+class KafkaMessageQueueTrigger(MessageQueueTrigger):
+    """
+    A dedicated trigger for Kafka message queues that extends 
MessageQueueTrigger.
+
+    This trigger extends the common MessageQueueTrigger and is designed to work

Review Comment:
   ```suggestion
       This trigger extends the common ``MessageQueueTrigger`` and is designed 
to work
   ```



##########
providers/apache/kafka/docs/triggers.rst:
##########
@@ -28,3 +28,15 @@ The ``AwaitMessageTrigger`` is a trigger that will consume 
messages polled from
 If the callable returns any data, a TriggerEvent is raised.
 
 For parameter definitions take a look at 
:class:`~airflow.providers.apache.kafka.triggers.await_message.AwaitMessageTrigger`.
+
+
+KafkaMessageQueueTrigger
+----------------------------------
+
+The ``KafkaMessageQueueTrigger`` is a dedicated interface class for Kafka 
message queues that extends
+the common 
:class:`~airflow.providers.common.messaging.trigger.msg_queue.MessageQueueTrigger`.
 It is designed to work with the KafkaMessageQueueProvider and provides

Review Comment:
   ```suggestion
   the common 
:class:`~airflow.providers.common.messaging.trigger.msg_queue.MessageQueueTrigger`.
 It is designed to work with the ``KafkaMessageQueueProvider`` and provides
   ```



##########
providers/apache/kafka/src/airflow/providers/apache/kafka/triggers/msg_queue.py:
##########
@@ -0,0 +1,102 @@
+# 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.
+from __future__ import annotations
+
+from collections.abc import Sequence
+from typing import Any
+
+from airflow.providers.common.messaging.triggers.msg_queue import 
MessageQueueTrigger
+
+
+class KafkaMessageQueueTrigger(MessageQueueTrigger):
+    """
+    A dedicated trigger for Kafka message queues that extends 
MessageQueueTrigger.
+
+    This trigger extends the common MessageQueueTrigger and is designed to work
+    with the KafkaMessageQueueProvider. It provides a more specific interface

Review Comment:
   ```suggestion
       with the ``KafkaMessageQueueProvider``. It provides a more specific 
interface
   ```



-- 
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