mrk-andreev commented on code in PR #44307:
URL: https://github.com/apache/airflow/pull/44307#discussion_r1868456806
##########
providers/src/airflow/providers/apache/kafka/hooks/consume.py:
##########
@@ -36,7 +50,12 @@ def __init__(self, topics: Sequence[str],
kafka_config_id=KafkaBaseHook.default_
self.topics = topics
def _get_client(self, config) -> Consumer:
- return Consumer(config)
+ config_shallow = config.copy()
+ if config.get("error_cb", None) is None:
Review Comment:
`config.get("error_cb", None)` is equivalent to `config.get("error_cb")`
##########
providers/src/airflow/providers/apache/kafka/hooks/consume.py:
##########
@@ -23,6 +23,18 @@
from airflow.providers.apache.kafka.hooks.base import KafkaBaseHook
+class KafkaAuthenticationError(Exception):
+ """Custom exception for Kafka authentication failures."""
+
+ pass
+
+
+def error_callback(err):
+ """Handle kafka errors."""
+ print("Exception received: ", err)
Review Comment:
Do we need this print statement here? Perhaps we can remove it.
--
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]