Skip to content

Consumer

Consumer

Bases: Broker

Abstract implementation a consumer for a broker.

A consumer allows to subscribe to a data stream.

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

get_message() abstractmethod

Get the published messages of the subscription.

RETURNS DESCRIPTION
iterator

An async iterator for the messages.

TYPE: AsyncIterator