WatcherContext
faststream.broker.push_back_watcher.WatcherContext #
WatcherContext(
watcher: BaseWatcher,
message: Union[
SyncStreamMessage[MsgType], StreamMessage[MsgType]
],
**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 |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
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: |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
Source code in faststream/broker/push_back_watcher.py
Last update: 2023-11-13