protocols.eventsub.DLQSubscriberProtocol

A protocol for consuming events from an event broker with the header data included.

Usage

Source

protocols.eventsub.DLQSubscriberProtocol()

In addition to the methods described below, implementations shall expose the the following attributes:

Classes

Name Description
MalformedPayloadError Raised if the payload of a received event was not formatted as expected given

MalformedPayloadError

Raised if the payload of a received event was not formatted as expected given

Usage

Source

MalformedPayloadError()

the type.

Methods

Name Description
consume() Receive an event of interest and process it according to its type.

consume()

Receive an event of interest and process it according to its type.

Usage

Source

consume(*, payload, type_, topic, key, event_id, timestamp, headers)
Parameters
payload: JsonObject

The data/payload to send with the event.

type_: Ascii

The type of the event.

topic: Ascii

Name of the topic the event was published to.

key: Ascii

A key used for routing the event.

event_id: UUID4

The unique identifier of the event.

timestamp: datetime

The timestamp assigned by either the publisher or the broker.

headers: Mapping[str, str]
The event headers containing important metadata.