rawwar commented on issue #43569:
URL: https://github.com/apache/airflow/issues/43569#issuecomment-2467739469

   @aritra24 , consumer config also takes `error_cb`. I was able to make 
Consumer fail by using an `error_cb`. Consider looking into this direction, if 
there is no better way
   
   ```
   class KafkaAuthenticationError(Exception):
       """Custom exception for Kafka authentication failures"""
       pass
   
   def error_callback(err):
       """Callback function to handle Kafka errors"""
       if err.code() == KafkaError._AUTHENTICATION:
           raise KafkaAuthenticationError(f"Authentication failed: {err}")
       print("Exception received: ", err)
   ```


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