airflow.providers.apache.kafka.hooks.produce

Module Contents

Classes

KafkaProducerHook

A hook for creating a Kafka Producer.

class airflow.providers.apache.kafka.hooks.produce.KafkaProducerHook(kafka_config_id=KafkaBaseHook.default_conn_name)[source]

Bases: airflow.providers.apache.kafka.hooks.base.KafkaBaseHook

A hook for creating a Kafka Producer.

Parameters

kafka_config_id – The connection object to use, defaults to “kafka_default”

get_producer()[source]

Return a producer object for sending messages to Kafka.

Was this entry helpful?