Skip to content

SyncStreamMessage

faststream.broker.message.SyncStreamMessage #

Bases: ABCStreamMessage[Msg]

body instance-attribute #

body: Union[bytes, Any]

content_type class-attribute instance-attribute #

content_type: Optional[str] = None

correlation_id class-attribute instance-attribute #

correlation_id: str = field(
    default_factory=lambda: str(uuid4())
)

decoded_body class-attribute instance-attribute #

decoded_body: Optional[DecodedMessage] = None

headers class-attribute instance-attribute #

headers: AnyDict = field(default_factory=dict)

message_id class-attribute instance-attribute #

message_id: str = field(
    default_factory=lambda: str(uuid4())
)

path class-attribute instance-attribute #

path: AnyDict = field(default_factory=dict)

processed class-attribute instance-attribute #

processed: bool = False

raw_message instance-attribute #

raw_message: Msg

reply_to class-attribute instance-attribute #

reply_to: str = ''

ack abstractmethod #

ack(**kwargs: Any) -> None
Source code in faststream/broker/message.py
@abstractmethod
def ack(self, **kwargs: Any) -> None:
    raise NotImplementedError()

nack abstractmethod #

nack(**kwargs: Any) -> None

A function to raise a NotImplementedError.

PARAMETER DESCRIPTION
kwargs

Additional keyword arguments

TYPE: Any DEFAULT: {}

RETURNS DESCRIPTION
None

None

Note

The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)

Source code in faststream/broker/message.py
@abstractmethod
def nack(self, **kwargs: Any) -> None:
    """A function to raise a NotImplementedError.

    Args:
        kwargs: Additional keyword arguments

    Returns:
        None
    !!! note

        The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
    """
    raise NotImplementedError()

reject abstractmethod #

reject(**kwargs: Any) -> None

Reject function.

PARAMETER DESCRIPTION
**kwargs

Arbitrary keyword arguments

TYPE: Any DEFAULT: {}

RETURNS DESCRIPTION
None

None

RAISES DESCRIPTION
NotImplementedError

Always raises NotImplementedError

Note

The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)

Source code in faststream/broker/message.py
@abstractmethod
def reject(self, **kwargs: Any) -> None:
    """Reject function.

    Args:
        **kwargs: Arbitrary keyword arguments

    Returns:
        None

    Raises:
        NotImplementedError: Always raises NotImplementedError
    !!! note

        The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
    """
    raise NotImplementedError()

Last update: 2023-11-13