ABCPublisher
faststream.confluent.shared.publisher.ABCPublisher dataclass #
Bases: ABC, BasePublisher[MsgType]
A class representing an ABCPublisher.
calls class-attribute instance-attribute #
include_in_schema class-attribute instance-attribute #
mock class-attribute instance-attribute #
get_payloads #
Source code in faststream/broker/publisher.py
publish abstractmethod async #
publish(
message: SendableMessage,
correlation_id: Optional[str] = None,
**kwargs: Any
) -> Optional[SendableMessage]
Publish a message.
| PARAMETER | DESCRIPTION |
|---|---|
message | The message to be published. TYPE: |
correlation_id | Optional correlation ID for the message. |
**kwargs | Additional keyword arguments. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
Optional[SendableMessage] | The published message. |
| RAISES | DESCRIPTION |
|---|---|
NotImplementedError | If the method is not implemented. |
Source code in faststream/broker/publisher.py
reset_test #
schema #
Returns the schema of the API operation as a dictionary of channel names and channel objects.