Skip to content

NackMessage

faststream.exceptions.NackMessage #

NackMessage(**kwargs)

Bases: HandlerException

Exception raised to negatively acknowledge a message immediately.

This exception can be used to nack a message with additional options. To watch all allowed parameters, please take a look to your broker's message.nack(**extra_options) method signature.

PARAMETER DESCRIPTION
kwargs

Additional parameters that will be passed to message.nack(**extra_options) method.

TYPE: Any DEFAULT: {}

Source code in faststream/exceptions.py
def __init__(self, **kwargs: Any):
    self.extra_options = kwargs
    super().__init__()

extra_options instance-attribute #

extra_options = kwargs