Skip to content

Kafka consumer

KafkaConsumer

Bases: Consumer

Implementation of a consumer for Kafka

connect(data_stream) async

Connects to the broker running in StreamPipes and creates a subscription.

PARAMETER DESCRIPTION
data_stream

Contains the meta information (resources) for a data stream.

TYPE: DataStream

RETURNS DESCRIPTION
None

disconnect() async

Closes the connection to the server.

RETURNS DESCRIPTION
None

get_message()

Get the published messages of the subscription.

RETURNS DESCRIPTION
iterator

An async iterator for the messages.

TYPE: AsyncIterator


Last update: December 7, 2024