protocols.eventpub.EventPublisherProtocol

A protocol for publishing events to an event broker.

Usage

Source

protocols.eventpub.EventPublisherProtocol()

Methods

Name Description
publish() Publish an event.

publish()

Publish an event.

Usage

Source

publish(*, payload, type_, key, topic, event_id=None, headers=None)

Args: - payload (JSON): The payload to ship with the event. - type_ (str): The event type. ASCII characters only. - key (str): The event type. ASCII characters only. - topic (str): The event type. ASCII characters only. - event_id (UUID4, optional): An optional event ID. If not provided, a new one will be generated. - headers: Additional headers to attach to the event.