Skip to content

WatcherContext

faststream.broker.acknowledgement_watcher.WatcherContext #

WatcherContext(message, watcher, logger=None, **extra_options)

A class representing a context for a watcher.

Source code in faststream/broker/acknowledgement_watcher.py
def __init__(
    self,
    message: "StreamMessage[MsgType]",
    watcher: BaseWatcher,
    logger: Optional["LoggerProto"] = None,
    **extra_options: Any,
) -> None:
    self.watcher = watcher
    self.message = message
    self.extra_options = extra_options
    self.logger = logger

watcher instance-attribute #

watcher = watcher

message instance-attribute #

message = message

extra_options instance-attribute #

extra_options = extra_options

logger instance-attribute #

logger = logger