Skip to content

default_filter

faststream.broker.core.asyncronous.default_filter async #

default_filter(msg: StreamMessage[Any]) -> bool

A function to filter stream messages.

PARAMETER DESCRIPTION
msg

A stream message object

RETURNS DESCRIPTION
bool

True if the message has not been processed, False otherwise

Note

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

Source code in faststream/broker/core/asyncronous.py
async def default_filter(msg: StreamMessage[Any]) -> bool:
    """A function to filter stream messages.

    Args:
        msg : A stream message object

    Returns:
        True if the message has not been processed, False otherwise
    !!! note

        The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
    """
    return not msg.processed

Last update: 2023-11-13