WatcherContext
faststream.broker.push_back_watcher.WatcherContext #
WatcherContext(message: Union[SyncStreamMessage[MsgType], StreamMessage[MsgType]], watcher: BaseWatcher, **extra_ack_args: Any)
A class representing a context for a watcher.
METHOD | DESCRIPTION |
---|---|
__aenter__ | called when entering the context |
__aexit__ | called when exiting the context |
__ack | acknowledges the message |
__nack | negatively acknowledges the message |
__reject | rejects the message |
Initialize a new instance of the class.
PARAMETER | DESCRIPTION |
---|---|
watcher | An instance of BaseWatcher. TYPE: |
message | An instance of SyncStreamMessage or StreamMessage. TYPE: |
**extra_ack_args | Additional arguments for acknowledgement. TYPE: |